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>
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/