SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to change the size of line break

    How do you adjust the size of a line break?

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    line-height?

    That works to set the height between lines for paragraphs. For <br /> tags, I'm not really sure.

  3. #3
    SitePoint Zealot martin's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use line-height for space between lines, for space between paragraphs I generally use something like;

    p {
    margin-bottom: 10px;
    margin-top: 0px;
    }

    Note you could add in line-height into the code above as well!
    Martin

  4. #4
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What would the CSS be for that?

  5. #5
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Joshua Clinard
    What would the CSS be for that?
    For the line height?
    Code:
    line-height: /*...VALUE HERE.../*;
    ...like what Vinnie said. Martin gave you the CSS for the space between paragraphs with the margins, though it could be written to save a few keystrokes:
    Code:
    p { margin: 10px 0px 0px; }
    Hope this helps. :-)

    ~~Ian

  6. #6
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no, I meant which element should I apply this to? The p element, or a br element?

    If the br element, would I just do <br class="space" />, or something similar?

  7. #7
    SitePoint Zealot martin's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Joshua Clinard
    no, I meant which element should I apply this to? The p element, or a br element?

    If the br element, would I just do <br class="space" />, or something similar?
    the code I wrote would only effect the p tags, if you wish to have different spaces for <br> tags then yes, as you say, create a class for the <br>

    .extraspace {
    margin: 0px, 0px, 10px, 0px;
    }

    this would add 10px to the bottom of the <br> tag. Your code would look like:

    <br class="extraspace" />

    I wrote the original code with clarity in mind, showing margin-top etc. but yes you can write all the margins in a single line!
    Martin


Bookmarks

Posting Permissions

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