Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Line break between two <p> tags

    How do i make the line height between two <p> tags smaller? is there a way?

    Code:
    <p>just below this paragraph there is too much of a gap for my needs</p>
    <p>just above this paragraph there is too much of a gap for my needs</p>
    Thanks guys.

    John.

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    If you mean the default space between the paragraphs, you would use:

    Code:
    p { margin: 0; }
    If you literally mean the line‐height, you can change the entire line‐height by using:

    Code:
    p { line-height: 1; }
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    borner:none is not the spacing between the paragraphs. border is what creates an outline around the paragraph itself.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    New Coder
    Join Date
    Apr 2007
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you, <p style="margin: 0;"></p> did the trick nicley.

  • #5
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    borner:none is not the spacing between the paragraphs. border is what creates an outline around the paragraph itself.
    Thank you,
    I have removed my incorrect information.

    effpeetee


  •  

    Posting Permissions

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