Re: [css-d] IE6 Non-Existant Class Bug
Bob Rosenberg wrote: Yes. Embed the correct version of the rule on the page. ID has to be unique on the page so IE6 is correct in stopping on the mismatch since when it finds the ID'ed tag with the wrong class on it since there can not be another tag with that ID to match. While it is theoretically valid to have more than one possible match, this would only be valid if the rules occur in a *.css Style Sheet. In that case, at least in theory, the rules could be intended to apply to different pages and should thus the rules should be fully parsed. Also, again at least in theory, if you rewrite the DOM text (and thus alter the class), the mismatch should NOT stop the parse. First, I originally experienced this issue using an external stylesheet, so that is clearly not the issue. Second, ID has to be unique in the HTML, not within the CSS. It is perfectly valid to have a single ID and give that element two classes, eg: div id=myDiv class=content specialFoo/div And also valid to style this div using: #myDiv.content { border: 1px solid black; } #myDiv.special { background-color: yellow; } If however, you keep those same style rules and change the html to be: div id=myDiv class=specialFoo/div Just because #myDiv.content isn't found on the page doesn't mean that @myDiv.special can't exist. The browser should still follow the second rule. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] IE6 Non-Existant Class Bug
At 12:59 -0400 on 09/26/2007, Seth Green wrote about [css-d] IE6 Non-Existant Class Bug: As you will see if you load the page below... In IE6 the div remains red, even though it is explicitly set to green in the last rule. It seems that the middle rule, which targets a non-existant class is causing the problem. Remove that, and the div is green, even in IE6. Note: If instead of using the additional class selector in the last rule, I just use the id, then this problem also goes away. Has anyone ever experienced this issue? Is there a workaround? Yes. Embed the correct version of the rule on the page. ID has to be unique on the page so IE6 is correct in stopping on the mismatch since when it finds the ID'ed tag with the wrong class on it since there can not be another tag with that ID to match. While it is theoretically valid to have more than one possible match, this would only be valid if the rules occur in a *.css Style Sheet. In that case, at least in theory, the rules could be intended to apply to different pages and should thus the rules should be fully parsed. Also, again at least in theory, if you rewrite the DOM text (and thus alter the class), the mismatch should NOT stop the parse. -- Bob Rosenberg RockMUG Webmaster [EMAIL PROTECTED] www.RockMUG.org __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] IE6 Non-Existant Class Bug
nobody's got nuthin' ? Seth Green wrote: As you will see if you load the page below... In IE6 the div remains red, even though it is explicitly set to green in the last rule. It seems that the middle rule, which targets a non-existant class is causing the problem. Remove that, and the div is green, even in IE6. Note: If instead of using the additional class selector in the last rule, I just use the id, then this problem also goes away. Has anyone ever experienced this issue? Is there a workaround? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta http-equiv=content-type content=text/html; charset=utf-8 / titleUntitled/title style #testDiv { background-color: red; color: #fff; font-size: 2em; } #testDiv.nonExistantClass { } #testDiv.foo { background-color: green; } /style /head body div id=testDiv class=foo This DIV should have a GREEN background. But it doesn't in IE6 /div /body /html __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] IE6 Non-Existant Class Bug
On 9/28/07, Seth Green wrote: As you will see if you load the page below... In IE6 the div remains red, even though it is explicitly set to green in the last rule. It seems that the middle rule, which targets a non-existant class is causing the problem. Remove that, and the div is green, even in IE6. Has anyone ever experienced this issue? Is there a workaround? IE has problems with selectors like #id.class, in short when it founds one not matching, it doesn't look further, ignoring matching ones (sort of.) See [1], [2] for examples of places where this has been discussed. Bruno [1] http://archivist.incutio.com/viewlist/css-discuss/60191 [2] http://www.quirksmode.org/bugreports/archives/2006/04/CSS_Bug_in_MSIE_6_Selector_with_an_ID_and_a_Class_.html -- Bruno Fassino http://www.brunildo.org/test __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] IE6 Non-Existant Class Bug
As you will see if you load the page below... In IE6 the div remains red, even though it is explicitly set to green in the last rule. It seems that the middle rule, which targets a non-existant class is causing the problem. Remove that, and the div is green, even in IE6. Note: If instead of using the additional class selector in the last rule, I just use the id, then this problem also goes away. Has anyone ever experienced this issue? Is there a workaround? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta http-equiv=content-type content=text/html; charset=utf-8 / titleUntitled/title style #testDiv { background-color: red; color: #fff; font-size: 2em; } #testDiv.nonExistantClass { } #testDiv.foo { background-color: green; } /style /head body div id=testDiv class=foo This DIV should have a GREEN background. But it doesn't in IE6 /div /body /html __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/