I have many <br />
tag within a main <p>
tag.
I would like increase the visual space created by the <br>
(example margin top and bottom).
<p>
Some text here<br />
Some other text<br />
Some other text
</p>
I could use different <p>
but I have to do it in this way in my website.
Any idea h开发者_如何学Goow increase the space created by <br>
? Many thanks.
Take a look at the line-height property of CSS.
Example:
p { line-height: 90%; }
If you no want to use css, try of this code. when you use style with
of Html file the javascript programming will be prefer your order in Html file instead of same class inside the file of css.
<p style="line-height: 2.7">
Some text here<br />
Some other text<br />
Some other text
</p>
<p style="margin-top: 3.5em">
Some text here<br />
Some other text<br />
Some other text
</p>
<p style="line-height: 0.6; margin-top: 7.0em">
Some text here<br />
Some other text<br />
Some other text
</p>
I hope my answer helped for your question.
best regards,
Wahab
You need to use the line-height
property.
p {line-height:70px}
I think br tags are for line breaks nothing more nothing less. Why try to write a work-around-ish kinda code. If you can't go with any suggested answers i would say just use multiple br tags.
精彩评论