Efferent
07-31-2007, 06:33 PM
<html>
<head>
<title>Untitled Document</title>
<style type="text/css">
p:first-child em {color:green}
p:first-child strong {color:red}
</style>
</head>
<body>
<p><em>Emphasis</em></p>
<p><strong>Strong</strong></p>
</body>
</html>
As you see, there are two "p" elements here. When load this page in FF2.0 the first "p" element works fine. The text turns green. The second "p" element doesn't work correctly. The text remains black colour.
I load the same page in IE6. Both "p" elements doesn't work.
I know IE6 has problem with some pseudo classes. What I don't understand is why some of the code works fine some doesn't. Could this be a bug of browser?
<head>
<title>Untitled Document</title>
<style type="text/css">
p:first-child em {color:green}
p:first-child strong {color:red}
</style>
</head>
<body>
<p><em>Emphasis</em></p>
<p><strong>Strong</strong></p>
</body>
</html>
As you see, there are two "p" elements here. When load this page in FF2.0 the first "p" element works fine. The text turns green. The second "p" element doesn't work correctly. The text remains black colour.
I load the same page in IE6. Both "p" elements doesn't work.
I know IE6 has problem with some pseudo classes. What I don't understand is why some of the code works fine some doesn't. Could this be a bug of browser?