Sent by Austin, Darrel on 17 October 2003 15:03
> Is anyone familiar with this issue? It seems as if IE can't
> handle a style
> sheet with two styles both for the same ID, but with
> different classes:
> div.classone#districtSelect {
> background-color: #ffc;
> }
>
> div.classtwo#districtSelect {
> background-color: #000;
> }
UPDATE:
While the above works fine in Mozilla, it fails in IE6. The solution for me
was to finally swap the class and id in the html and then declare the CSS
styles separately. Once for the ID and then once for the class:
div.classone {variable styles}
div#idone {static styles}
Originally, I thought I had to keep the ID static, as Javascript was being
used, but that's not the case in this particular bit of markup, so I can use
this workaround.
I am curious as to why it is doing it. It appears that the above styles in
IE6 assign the background-color to the ID so it affects both styles
regardless of class. Is that a bug, or is that how the spec works?
-Darrel
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/