How do I size a linespace in css?

Discussion in 'CSS' started by MisterZee, Sep 29, 2005.

  1. #1
    Don't know much about css. I have a <br /> that's taking too much space. What's the easiest way inline to make a linespace and be able to say how many pixels high I want it so I can fool around until I am happy with the spacing?
     
    MisterZee, Sep 29, 2005 IP
  2. TheHoff

    TheHoff Peon

    Messages:
    1,530
    Likes Received:
    130
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Surround each paragraph with a <p> or <div> and set the bottom padding/margin on them. Don't put a <br /> in between.
     
    TheHoff, Sep 29, 2005 IP
  3. MisterZee

    MisterZee Peon

    Messages:
    227
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Uh, thanks but can you be more specific? Like <div XXXX:3px>what here?</div>

    Oh, you mean put the paragraph that needs the space inside a <p>? So it would be <p xxx:3px>stuff</p>?
    What does the xxx: wording look like?
     
    MisterZee, Sep 29, 2005 IP
  4. TheHoff

    TheHoff Peon

    Messages:
    1,530
    Likes Received:
    130
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sure.. more specifically:

    <div style="padding-bottom:6px;">
    First paragraph goes here.
    </div>

    <div style="padding-bottom:6px;">
    Second paragraph goes here.
    </div>


    The proper way to do it would be to give each div the same class name like

    <div class="spaced">

    and then in your external .css file

    .spaced
    {
    padding-bottom:6px;
    }
     
    TheHoff, Sep 29, 2005 IP
  5. MisterZee

    MisterZee Peon

    Messages:
    227
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You're a lifesaver!
     
    MisterZee, Sep 29, 2005 IP