IE8 and Firefox CSS selector difference?
I am getting really weird behavior, it seems like IE8 is not handling the child selector in CSS correctly. Consider the following:
<html>
<head>
<style>
ul>li {font-style: ital开发者_StackOverflowic}
</style>
</head>
<body>
<ul> <li>Hello </li> </ul>
</body>
</html>
This displays Hello in italics on FF, but not on IE8. If you change the selector to:
ul li {...}
It displays italic in both browsers.
Where am I going wrong?
IE8 can and should be displaying this CSS declaration correctly. Check your Compatibility View settings and confirm that you're not rendering the page in IE7 mode.
精彩评论