how to avoid a new line with p tag?
Solution 1:
Use the display: inline
CSS property.
Ideal: In the stylesheet:
#container p { display: inline }
Bad/Extreme situation: Inline:
<p style="display:inline">...</p>
Solution 2:
The <p>
paragraph tag is meant for specifying paragraphs of text. If you don't want the text to start on a new line, I would suggest you're using the <p>
tag incorrectly. Perhaps the <span>
tag more closely fits what you want to achieve...?
Solution 3:
I came across this for css
span, p{overflow:hidden; white-space: nowrap;}
via similar stackoverflow question