Click to See Complete Forum and Search --> : Adjusting distance for </br> or <p>


ketanco
02-01-2009, 01:17 PM
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 tryig 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?

toenailsin
02-01-2009, 01:28 PM
use <p> and adjust the margins

margin (http://www.w3schools.com/CSS/css_margin.asp)

ketanco
02-01-2009, 02:17 PM
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>

Fang
02-02-2009, 12:34 AM
Don't use <br>.
What you really have is a list of links; use <ul>
Alternatively wrap each anchor in a <p> with the padding and margin set for <p>.