Jump to content

pseudo-class discrepencies between browsers


A-Damage
 Share

Recommended Posts

I have tried using the :hover pseudo-class for li elements to give a bit of dynamics to rollovers for links. Basically I use something like this (although I would probably use some sort of image, i.e. an arrow, instead of the basic item marker):

<html><head><style type="text/css">body{font:10pt verdana;color:black;}ul {list-style-type:none;}li:hover {list-style-type:disc;}a:link, a:visited{text-decoration:none;color:dodgerblue;}a:hover{text-decoration:none;color:gray;}a:active{text-decoration:none;color:dodgerblue;}</style></head><body><ul><li><a href="#">Link #1</a></li></ul></body></html>

This works fantastically in Firefox, but IE refuses to show the item marker on hover. Does anyone know why? According to w3schools, the :hover pseudo-class is supported all the way back to IE4. Does the :hover pseudo-class only work for anchors in IE? Thanks in advance for any answers regarding this.Well, nevermind, I guess. I added the XHTML transitional DTD to the code and it seemed to correct the problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...