could anyone help why hover doesnt work on some of my link.
below is my code!
thnks in advance!!!

a:link {color:#FF0000;}     

a:visited {color:#00FF00;} 

 a:hover {text-decoration: underline;} 

a:active {color:#0000FF;}

But where is the rest of it? Without the html this is supposed to style, we have no way to know where the problem might be - aside from that space in front of the a:hover which should make no difference.

sorry for late reply coz i've been busy...

this is my html code:

<div id="hover">
<a href="home.jsp">home</a>
<a href="profile.jsp">profile</a>
<a href="contact.jsp">contact</a>
</div>

What's the styling on #hover? Does it have anything that might conflict with

a:hover {text-decoration: underline;}

Have you tried

#hover a:hover {text-decoration: underline;}

?

I havent tried that coz I want to apply hover on all link without specifying the class or id???is it possible?

All I'm suggesting is to test it that way. There still may be something keeping the items in the div from inheriting the way you think they should.

You might also try

a:link:hover {text-decoration: underline;}

maybe this might help..classes are for multiple items (you can specify a certain div to be a specific class without affecting everything else with in that apparent ID)

...ID's are for one major item(s)..you can use classes repeatedly where ever you wish. ID's are ment for things like containers, header, footer..ect..

I think im gonna do it that way!!!thanks for the help!!!

Also validate both your html and css. - Errors and strange behavior can slip in that way as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.