PDA

View Full Version : hover & active link problem!!!


nits4u
07-03-2009, 06:50 AM
styles for "hover" and "active" links are not working on chrome.
and also in firefox when i open a link in new tab, active link style works fine, but on simple click style does not work.

here is code:

#sidebar #menu ul li a
{
color: #FFF;
text-decoration: none;
}
#sidebar #menu ul li a:hover ,#sidebar #menu ul li a:active{
color: #000;
background-color: #FFF;
display: block;
}


hlp me out.

domedia
07-03-2009, 04:35 PM
Nothing wrong with the code. Link please.

nits4u
07-03-2009, 05:45 PM
Link !! of what?
still developing the page... :|

nits4u
07-03-2009, 05:48 PM
<div id="sidebar">
<div id="menu">
<ul>
<li><a href="#" title="a">a</a></li>
<li><a href="#" title="b">b</a></li>
<li><a href="#" title="c">c</a></li>
<li><a href="#" title="d">d</a></li>
<li><a href="#" title="e">e</a></li>
<li><a href="#" title="f">f</a></li>
</ul>
</div> <!--menu-->
</div> <!--sidebar-->

DWcourse
07-03-2009, 07:04 PM
Try moving the display: block property to the #sidebar #menu ul li a style

{
color: #FFF;
display: block;
text-decoration: none;
}
#sidebar #menu ul li a:hover ,#sidebar #menu ul li a:active{
color: #000;
background-color: #FFF;
}

domedia
07-03-2009, 09:11 PM
Link !! of what?
still developing the page... :|
Upload the page to the web somewhere.. kinda normal around here anyways, helps alot when you try to get help 8)

nits4u
07-04-2009, 03:36 AM
is that ok if i write the necessary coding for whole of the page here ?

d a v e
07-04-2009, 12:47 PM
you could but man, just upload it as a test page - it's the least you can do if people are willing to devote time to helping you.

nits4u
07-04-2009, 05:20 PM
hey guys the problem is solved....

thanks to all of U, you for support. :grin: