I have incorporated a <div>
tag in my HTML with varying vertical spacing between lines of text. To achieve this, I am utilizing <br />
elements along with a CSS class that indicates the desired amount of spacing.
For example, for a 5px gap, I insert a <br>
with the class height5
:
<br /><br class="height5" />
In a similar fashion, classes like height2
, height10
, and others serve the same purpose.
The corresponding CSS classes are defined as follows:
br.height2 {line-height:2px;}
br.height5 {line-line:5px;}
This technique functions smoothly in IE6+, FF2+, and Opera. However, Safari and Chrome seem to be encountering issues as they display large gaps (resembling regular line breaks) instead of respecting the specified spacing. Strangely enough, Safari and Chrome acknowledge larger line-heights such as 20px or 30px but disregard anything below 5-10 pixels.
Any suggestions or assistance would be greatly appreciated. Thank you!