Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Oct 2007
    Posts
    241
    Member #
    15910
    Hello, I have a basic question. How do you adjust the height of empty space between two lines of text under each other? </br> seems to little and <p> seems too much for what i am trying to do....such as

    <p> some text - line 1</p>
    <p> some text - line 2</p>

    some text - line 1

    some text - line 2

    Here the distance between two lines of text is too much for what I am trying to do...But if I used </br> then two lines are displaying right on top of each other, almost touching...I need some distance in between the two extremes. How do you do that?

  2.  

  3. #2
    Senior Member aeroweb99's Avatar
    Join Date
    Feb 2008
    Location
    Port Huron, Michigan
    Posts
    1,037
    Member #
    16468
    Liked
    1 times
    Using css, add a margin to the p declaration to your liking. If you don't want it on all paragraphs then add a class or id to the particular paragraph.

  4. #3
    Senior Member
    Join Date
    Oct 2007
    Posts
    241
    Member #
    15910
    Neither of the code below worked...What is wrong here? (by the way this is in a php echo statement)
    <a style='margin-bottom: -9px;' href='........'> $aa[0]</a><p>

    or
    <a href='.......'> $aa[0]</a><p style='margin-bottom: -9px;'>

    whatever px value i use, it seems no effect on the space between this line and the line below.
    without any margin, the code was like below by the way...all i want is to be able to adjust space between them...
    <a href='.......'> $aa[0]</a></br>
    <a href='......'> $aa[1]</a></br>
    <a href='.......'> $aa[2]</a></br>

  5. #4
    Senior Member jyuill's Avatar
    Join Date
    Jan 2009
    Location
    California
    Posts
    145
    Member #
    18049
    If you want space in between each line of a <p> or <a> and not just between one <p> and another, use line-height. If you want space in between one <p> and another use margin. If you want more space, you shouldn't be using a negative margin.
    Semantic, Valid, and Accessible Design!


  6. #5
    Senior Member aeroweb99's Avatar
    Join Date
    Feb 2008
    Location
    Port Huron, Michigan
    Posts
    1,037
    Member #
    16468
    Liked
    1 times
    Apply a line-height globally in a style sheet if you want it to be uniform throughout the site. If you just want it for a particular section, then wrap it in a div and apply your bottom margins or line height there. You also have single quotes in the "a" tag where it should be double quotes, however I don't know if that's how it needs to be with php or not. I personally don't like inline styles as it bloats the code and you can always get the effect your looking for by wrapping that section in a div.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:45 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com