开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜