CSS Bug in MSIE 6 - Selector with an ID and a Class on the Same Element

Atom RSS

This site heavily relies on bug reports created by its readers. Anyone can report a bug and be published.

Main navigation:




Search reports by browser:

Let's say that you have an element with an id of id. This element can have either of two different classes, classOne or classTwo. (Either you're swapping the className in script, or it can have different classes on different pages.)

Your CSS might look like this:

#id.classOne { some styles }
#id.classTwo { some different styles }

In MSIE 6, the #id.classTwo style will never be applied - unless it is put in a separate style tag or style sheet.

Test page Workaround is included
Reported by: Isaac Z. Schlueter.

Explorer 5-6 Windows | Reported on 10 April 2006.

Comments

(Add your own)

Post a comment

Commenting guidelines:

  1. When quoting specs, articles or your own research, please include a URL of the document.
  2. Test your stuff. When reporting browser behaviour, make sure that your report is correct.

Yes