html - a:active only briefly works (during mouse click) -
for reason, made text (a) active bolded, active when clicked mouse, when released click, turns off , text goes it's normal state.
why this?
if got msn, @ text above search bar. when click on it, bolds , turns orange. without leaving page. that's trying do.
html:
<div id="searchtopics"> <ul> <li><a href="#">web</a> </li> <li><a href="#">msn</a> </li> <li><a href="#">images</a> </li> <li><a href="#">video</a> </li> <li><a href="#">news</a> </li> <li><a href="#">maps</a> </li> <li><a href="#">shopping</a> </li> </ul> </div>
css:
#searchtopics { position:absolute; margin-left:208px; margin-top:38px; } #searchtopics { text-decoration:none; float:left; padding: 2px 6px 4px 6px; color:rgb(100,100,100); } #searchtopics a:hover{ text-decoration:underline; } #searchtopics a:active{ color:rgb(100,100,100); font-weight:bold; } #searchtopics ul { display:inline; list-style:none; } #searchtopics ul li { display:inline; color:rgb(100,100,100); font-family:"arial", times, sans-serif; font-size:12px; }
that's because link active hen click mouse. if want effect lastly entire length of mouse beingness on utilize :hover
. if want lastly after page has been visited utilize :visited
.
edit
if want link remain active when new page loaded you'll need give link class applies style it:
<li><a href="#" class="active">images</a> </li> #searchtopics a:active, a.active {
html css html-lists bold
No comments:
Post a Comment