CSS child selector (>) doesn't work with IE

Posted by Eric on Stack Overflow See other posts from Stack Overflow or by Eric
Published on 2010-03-08T16:16:11Z Indexed on 2010/03/26 3:03 UTC
Read the original article Hit count: 555

Filed under:
|
|
|

The following CSS works well under firefox but doesn't work under IE browser, Why?
Also, how can I make only the elements, directly under the parent element, be affected by CSS?

CSS:

.box{font:24px;}
.box>div{font:18px}
.box>div>div{font:12px;}

HTML:

<div class="box">
   level1
   <div>
      level2
      <div> level3</div>
      <div> level3</div>
   </div>
   <div>
      level2
      <div> level3</div>
      <div> level3</div>
   </div>
</div>

© Stack Overflow or respective owner

Related posts about css

Related posts about css-selectors