Results 1 to 2 of 2

Thread: Spacing between paragraphs

  1. #1
    Join Date
    Jan 2008
    Posts
    26

    Spacing between paragraphs

    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

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    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>
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •