How can I control the height of <BR>?
at the moment br creates more space between lines than I want and I prefer not to use line-height in <P> tags.Hello,
I'm no expert at CSS as far as compatibility, but I have created a style like...
.spacer {
line-height: 5px;
}
and then put the <br> in a span...
<span class="spacer"><br></span>
and that worked for me. Just adjust the line-height.
PhilipThanks patch2112
I tried your code as follow but I didn't see any effect.
<STYLE>
.spacer {
line-height: 25px;
}
</STYLE>
Line one<span class="spacer"><br></span>
Line two<span class="spacer"><br></span>
Line three<span class="spacer"><br></span>
Line fourdo you have to use <br /> to make the space? You can't use a list or anything good like that?
Anyways, for that use it looks more like you want to use line-hieght for all the text. br only breaks the line, it doesn't actually create space unless you put two of them (then it just makes another blank line).A <br> at the end of text doesn't add a line. Try this...
Here is some text<br>
<span class="spacer"><br></span>What do your lines actually represent? They look like a list to me.A <br> at the end of text doesn't add a line. Try this...
Here is some text<br>
<span class="spacer"><br></span>
use <br />you may use the CSS margin attribute to introduce a controled space between elements:
text
<p style="margin-top:14px"></p>
textWhat exactly are you trying to accomplish with the line breaks? If each line is a separate item, then use a list:
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
<li>five</li>
</ul>
Then use the appropriate CSS to make it look the way you want. Most importantly, we either need to see the HTML and CSS, or a screenshot of what you want to create. The fact is there are a hundred ways to skin this cat, and not all the ways work best for you.use <br />
Only if you're using a XHTML doctype. <br> is correct for a HTML doctype (though not necessarily the best way to do things in this case).
at the moment br creates more space between lines than I want and I prefer not to use line-height in <P> tags.Hello,
I'm no expert at CSS as far as compatibility, but I have created a style like...
.spacer {
line-height: 5px;
}
and then put the <br> in a span...
<span class="spacer"><br></span>
and that worked for me. Just adjust the line-height.
PhilipThanks patch2112
I tried your code as follow but I didn't see any effect.
<STYLE>
.spacer {
line-height: 25px;
}
</STYLE>
Line one<span class="spacer"><br></span>
Line two<span class="spacer"><br></span>
Line three<span class="spacer"><br></span>
Line fourdo you have to use <br /> to make the space? You can't use a list or anything good like that?
Anyways, for that use it looks more like you want to use line-hieght for all the text. br only breaks the line, it doesn't actually create space unless you put two of them (then it just makes another blank line).A <br> at the end of text doesn't add a line. Try this...
Here is some text<br>
<span class="spacer"><br></span>What do your lines actually represent? They look like a list to me.A <br> at the end of text doesn't add a line. Try this...
Here is some text<br>
<span class="spacer"><br></span>
use <br />you may use the CSS margin attribute to introduce a controled space between elements:
text
<p style="margin-top:14px"></p>
textWhat exactly are you trying to accomplish with the line breaks? If each line is a separate item, then use a list:
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
<li>four</li>
<li>five</li>
</ul>
Then use the appropriate CSS to make it look the way you want. Most importantly, we either need to see the HTML and CSS, or a screenshot of what you want to create. The fact is there are a hundred ways to skin this cat, and not all the ways work best for you.use <br />
Only if you're using a XHTML doctype. <br> is correct for a HTML doctype (though not necessarily the best way to do things in this case).