Christoph Bratschi wrote:
> 
> rvj wrote:
> >
> > Under IE I used two <BR> element to separate <LI> elements i.e.  to generate
> > a single line space
> >
> > However under Mozilla this generates two lines spaces. Since <BR> is not
> > well formed what should I use to generate single line spacing?

I don't believe this has anything to do with XHTML. As far as I know,
the behavior of <br/> is only defined as a line break - it may be that
no specification defines exactly how to handle multiple <br/> tags in a
row.

Depending on exactly what you are trying to do, you may find that using
<p></p> around your content, or putting <br/>&nbsp;<br/>, may do what
you want. For really complicated requirements, and if you're only
targetting recent browsers, you may want to try CSS margin-top and
margin-bottom properties.

Alternatively, since you're inside a list, you could try ending the list
and re-starting it, eg:

<ul>
  <li>Foo</li>
  <li>Double line space here:</li>
</ul>
<ul>
  <li>See?</li>
</ul>

> Use <BR/> or <BR></BR> they are equivalent. Both stand for one line
> break.

By the way, XHTML mandates lowercase tags for everything, so this should
be <br/> or <br></br>. For compatibility with some older browsers, you
should include a space (<br /> rather than <br/>) also.

Hope this helps!

Stuart.

PS I've set the followup to n.p.m.general because, although this is
offtopic for both groups, at least you're less likely to annoy people in
n.p.m.general because most developers stopped reading it already.

Reply via email to