Question

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

Was it helpful?

Solution

Please check this solution: http://www.howtocreate.co.uk/wrongWithIE/?chapter=Empty+Elements
This should help you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top