Line-Height Crop — a Simple CSS Formula to Remove Top Space From Your Text

Claudia Romano / filed under HTML & CSS

It’s a natural behavior of text elements to include some space on top (and bottom) of the element itself based on its line-height value. In some cases, you may need to remove those spaces as they can create inconsistencies in your page design.

Join thousands of product people and get the latest articles and resources from my curation every day or week.