Could I get help with CSS <p> tags

Discussion in 'CSS' started by boydysurf, Aug 3, 2006.

  1. #1
    Hey there DP,

    I've been having trouble with the way my text displays on this website I made ... www.premierlifeskills.org

    It is a WP blog and the way that the < p >tag is making the text read looks wrong. It is not placing a vertical space between the paragraphs.

    Where in the Css file is it making it do this? and what can be changed to make it space normally? This is the CSS file

    I would appreciate any help at all.
     
    boydysurf, Aug 3, 2006 IP
  2. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #2
    body,
    p, ul, ol, li, form,
    h1, h2, h3, h4, h5, h6 {
    	margin: 0;
    	padding: 0;
    	}
    Code (markup):
    You have no margin after or before your p elements. Thus it will all bunch up.

    Try adding to your code
    p {margin: 0 0 1em 0;}
    Code (markup):
     
    AdamSee, Aug 3, 2006 IP
  3. boydysurf

    boydysurf Banned

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Adamsee. Much appreciated.
     
    boydysurf, Aug 3, 2006 IP
  4. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #4
    here is the definition that shows

    /* General Rules */
    body,
    p {margin: 0 0 1em 0;}

    all 4 margins in ONE declaration
    means - clockwise:

    first value is top margin
    second value is right margin
    third value is bottom margin
    forth value is left margin

    if you want all margins to be same, for example 20px, then you can shorten it to

    p {margin: 20px}

    here the tutorial for further assistance
    http://www.w3schools.com/css/tryit.asp?filename=trycss_margin


    God bless
     
    hans, Aug 3, 2006 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    FYI, the usual default margins for paragraphs are

    p {margin: 1em 0;}

    That is, 1em above and below the p, and nothing to the sides.

    cheers,

    gary
     
    kk5st, Aug 3, 2006 IP