The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I am working on displaying some content submited by users.
Therefore, using a scripting solution instead of the <pre></pre> tags, I will replace each "\n" with a <br />.
Is that the best solution regarding the project?

I use both CSS and <br /> to make line breaks, depending on the situation I'm faced with. Sometimes I use several <br />'s and then use CSS to hide it so that non-CSS browsers still have easily readable content. When it comes to seperating things for everyone, I typically use only CSS and use paragraphs when I need to. For breaking long lines, simply parse the message and enter a space wherever you need to and the line will wrap by itself, no need for an explicit line break.

<br /> still has some use, one example off the top of my head is form layout. <input> elements aren't block-level so if you want an element following an <input> to appear on the next line, <br /> is one way of doing it. Of course, you could use CSS but then if the browser doesn't support CSS (or has them turned off) your form could end up being one long-running line.

also if you use <p> you can also give it a height and make the space that you are looking for the exact height you require, not sure if its the best way but its A way

My postings are a natural product.
The slight variations in spelling and grammar enhance its
individual character and beauty and in no way are to be
considered flaws or defects - http://www.guinnesspig.net