Previous Message
Next Message

Intervening HTML comments break CSS adjacent sibling selection in IE7

Sent by Ingo Chao on 30 April 2006 10:10


Ingo Chao wrote:
> 
> h1+h2 {color:green}
> 
> h1+*+h2 {color:red}
> 
> 
> <h1>test h1</h1>
> <!-- comment -->
> <h2>This h2 should be green.</h2>
> 
> IE7 (build 5346.5, April 25) renders the h2 in RED.
> 
> http://www.satzansatz.de/cssd/ie7apr25_sibling.html
> 
> CSS wouldn't be fun without IE.


Does IE7 style a HTML comment?

<body>
<p>paragraph, followed by two comments</p>
<!-- comment1 -->
<!-- comment2 -->
</body>

p+* {display: block; padding: 10px; margin: 5px; border: 2px solid red;}

p+*+* {display: block; padding: 10px; margin: 5px; border: 2px solid 
green; }


And will a comment react on hover?

p+*+*:hover {background: fuchsia}

Sure.

http://www.satzansatz.de/cssd/ie7apr25_sibling2.html

Screenshot (build 5346.5, April 25).:
http://www.satzansatz.de/cssd/ie7apr25_sibling2.png



Ingo

-- 
http://www.satzansatz.de/css.html
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: