开发者

IE with unordered list emty element

开发者 https://www.devze.com 2023-04-08 15:02 出处:网络
In my *.ascx file I have a following code: <ul> <li><ctl:CustomControl id=\"ctl1\" runat=\"server\"/></li>

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

精彩评论

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