How to Stop Text from Being Cut Off When Using CSS DIV or SPAN

When using CSS to format HTML pages its easy to miss the fact that the bottom line of your div or span tag cuts off some of your text. Typically this will be the bottom of a y, g, etc. All that needs to be done to fix this is to adjust the line-height of the div or span.

For Example: <div style=”line-height: 16px”>your text here</div>

Or: <span style=”line-height: 18px”>your text here</span>

Make sure to verify each page once they are complete that the text is not chopped off at the bottom. This can be extremely annoying to people visiting your sites.

Share