Fred Thomas
Fred Thomas

Reputation: 1

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: italic}
   </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?

Upvotes: 0

Views: 280

Answers (1)

Phil.Wheeler
Phil.Wheeler

Reputation: 16848

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.

Upvotes: 2

Related Questions