Hey Dave,
> > This is probably not the best solution either, for much the same reason as
> > nl2br() - it screws up layouts because <P> should always be
> > accompanied by </P>. Yes, yes, the HTML spec says (or used to say,
> > actually) that a closing <P> tag isn't required, but tell that to the
browsers.
>> It's not required, but that doesn't mean it can't change behaviour :-)
>Hate to be anal (snh snh), but I put the superior "or used to say, actually" in
there on purpose - the closing tags are required in XHTML 1.0, the current W3C
HTML recommendation:
http://www.w3.org/TR/xhtml1/#diffs
"4.3 For non-empty elements, end tags are required
In SGML-based HTML 4 certain elements were permitted to omit the end tag; with
the elements that followed implying closure. This omission is not permitted in
XML-based XHTML. All elements other than those declared in the DTD as EMPTY must
have an end tag."
> > If you want to do it this way, it's probably best to replace with
"<br><br>".
>> ..or how about "</p> <p>", and then prefix "<p>", suffix "</p>" to the entire
> string.
>Could do, but I can't stand P's. They always screw up spacing for me. With BR's,
you can continue using the FONT (not a big CSS fan either) until you need to
change it, and the spacing between paragraphs uses the appropriate font size,
rather than the default in the browser.
But I'm picky like that. I'm the same with my food. :)
adam
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!