views:

67

answers:

3

I am using following CSS:

#userinfo_box a:link,a:visited
{
    text-decoration:none;
}

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

The HTML is

<div id="userinfo_box"><a href="">Hello World</a></div>

In IE6, Hello World is not being underlined. How to do it in IE6?

+2  A: 

At the very least put a # in the href. Nothing in the href means it's not a link...so that might be your problem right there. If that doesn't fix the problem, let me know, and I'll install Multiple IE on my VM to test IE6.

<div id="userinfo_box"><a href="#">Hello World</a></div>
Kevin Nelson
+3  A: 

The only reason why IE6 might not be working in this instance is because the href is blank. Sometimes IE6 doesn't recognize a link properly if that property is blank. Try setting it as href="#" and it should work.

laurencek
+2  A: 

note that the selectors in your first ruleset should probably be corrected to:

#userinfo_box a:link, #userinfo_box a:visited {}
wolfcry911