IE with unordered list emty element
In my *.ascx file I have a following code:
<ul>
<li><ctl:CustomControl id="ctl1" runat="server"/></li>
<li><ctl:CustomControl id="ctl2" runat="server"/></li>
<li><ctl:CustomControl id="ctl3" runat="server"/></li>
</ul>
User control named "CustomControl" may produce some text, but in particular cases it may produce nothing (empty text).
I found that Firefox doesn't display开发者_StackOverflow社区 such empty list element (what is expected behaviour for me), but Internet explorer does.
What is the easiest way (i.e using css, without involving any C# code behind) to prevent IE displaying empty list element?
Please check this solution: http://www.howtocreate.co.uk/wrongWithIE/?chapter=Empty+Elements
This should help you.
精彩评论