HTML paragraphs not leaving spaces.

Soldato
Joined
25 Aug 2010
Posts
5,216
heya,i thought i was pretty "ok" with html but obviosuly not...

i cant for the life of me get my paragraphs to stop clumping up acting as though i had put linebreaks in instead of paragraphs...i thought this was the right way?:

<p>para1</p>
<p>para2</p>

the above works on everything i have ever tried, has it changed so much over the past 10 years that everything is diffrent :confused: i just want a line of space between each paragraph.
 
Browsers add a default amount of margin to p tags, but I'm guessing you're using a CSS Reset so you'll just need to readd the margin yourself.

p { margin-bottom: 15px;}
or if you're not using a relative font size,
p { margin-bottom: 1.4em;}

At least that's the way I prefer to do it. The default for HTML4 however is
p { margin: 1.12em 0 }
 
Last edited:
Browsers add a default amount of margin to p tags, but I'm guessing you're using a CSS Reset so you'll just need to readd the margin yourself.

p { margin-bottom: 15px;}
or if you're not using a relative font size,
p { margin-bottom: 1.4em;}

At least that's the way I prefer to do it. The default for HTML4 however is
p { margin: 1.12em 0 }

nopes its just normal HTML (i did just try what you said), on justin.tv to be exact. it's driving me crazy...
 
Justin.tv's CSS is overriding your standard HTML so you need to override theres.

Inline styles will do it. If they allow them.

Code:
<p style="margin-bottom:20px;">para1</p>
<p style="margin-bottom:20px;">para2</p>
 
Justin.tv's CSS is overriding your standard HTML so you need to override theres.

Inline styles will do it. If they allow them.

Code:
<p style="margin-bottom:20px;">para1</p>
<p style="margin-bottom:20px;">para2</p>

thank you! :eek: i really really appreciate it
 
Back
Top Bottom