Re: IE8 swallows tag before a list element

schlang wrote:
> Hi, if I want to add some space before a list element, two following
> <br/> tags will be recognized as one <br/> tag.
> Try this sample html in IE8 and in Firefox, you will notice that the
> IE8 will only show one <br/> tag:
>
>
> <html>This is some text where two line breaks should occur.<br/>
> <strong><em><u>Note:</u></em></strong> IE8 shows only one line break.
> Firefox shows two line breaks.
> <br/><br/><ul><li>This is really annoying</li></ul></html>
>
>
> Is it a bug? A feature? Can it be solved?

Multiple BR tags have long been problematic: different browsers have
done different things in the past. If you want two empty lines, it is
safer to put a &nbsp; between the BR tags to make sure the browser does
what you want.

Another issue is that BR is supposed to force a line break, but when you
use two BR tags, what you really are doing is trying to introduce a
larger vertical gap, and for this you should really be using CSS instead.

We will be happy to hear your thoughts

Leave a reply

TechEggs
Logo