0

I want to hide first li in a drop down in ul which has the ID "#ctl00_blInfo".

Below is css that I am using :

ul#ctl00_blInfo li:first-child { display : none }

Which is working fine except that I am getting an issue in ie7 where entire ul is hiding and it's not letting the drop down open.

<ul>
    <li>a</li>
    <li>b</li>
    <li><!--Drop down section-->
        <ul id="ctl00_blInfo">
            <li>aa</li>
            <li>bb</li>
            <li>cc</li>
        </ul>
    </li>
</ul>
Frits
  • 7,341
  • 10
  • 42
  • 60
Rohit Mehra
  • 229
  • 3
  • 15

2 Answers2

1

Your issue seems to be with the comment you have. For some reason IE7 bugs out and interprets the comment as an actual element. Try removing the comment and it should work as expected.

http://robertnyman.com/2009/02/04/how-to-solve-first-child-css-bug-in-ie-7/

Dryden Long
  • 10,072
  • 2
  • 35
  • 47
0

Yes, actual comments are taken as 'first child' in oder versions of IE. Either remove the comment or move it somewhere else.

Pablo Rincon
  • 999
  • 10
  • 23