views:

317

answers:

4

Hello!

For some reason my paragraphs are displaying line breaks when there is no <br/> tag being used! So if I type content into the HTML and hit return a few times it gets formatted that way.

How can I prevent that? Can I not just get it to flow?

A: 

Put this into your stylesheet:

p {white-space:normal;}
+2  A: 

Browsers will automatically render paragraph tags to have some padding unless you explicitly style it not to... is this the problem?

If so, p {padding: 0; margin:0;}

If not, try giving us some of your code and a better explanation of exactly what the problem is.

Evernoob
A: 

The <pre> tag will cause white space to display. So will a CSS rule like this:

p {white-space: pre;}

Could either of those be the problem?

Nathan Long
A: 

If the text is being broken to make it fit, you cannot / should not try to stop the text from breaking. However, if your problem is that the text is breaking at an undesirable point and you would rather have it break at a more appropriate point, use the following:

<nobr>... Unwanted break point here ...</nobr>

enclose the unwanted break point with nobr tags.

And, add the following at the appropriate break point:

... some text ... &#8203; Text on next line
Crimson