문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top