PDA

View Full Version : Spacing between paragraphs



mitchrenton
07 Mar 2008, 06:29 AM
Im sure this is a stupid question but im gona ask anyway! i was wondering whether there was some css so that i can have a little gap between my paragraphs instaed of using breaks in my html?

Mitch

Wickham
07 Mar 2008, 02:55 PM
Use a p tag for your paragraph and set a top margin. This will apply to all p tags on your page:-

Put this in a separate stylesheet or between <style type="text/css">....</style> tags in the head section:-

p { margin-top: 30px; }

and your body markup as:-
<p>Paragraph text</p>

If you only want the extra space above a few paragraphs, make a class:-

p.topmargin { margin-top: 30px; }

<p class="topmargin">Paragraph text</p>