Saving vertical font space with CSS

I use the Lucida Grande font for my site, and when I put the font size large, say 30 pixels, the fonts in the two adjacent lines overlap to some extent. How can I put a gap between two lines using CSS?

+4
source share
3 answers

Use the line-height . Sort of

 p { line-height: 1.3em; } 

Have to do. This will give you a line height 1.3 times the font size. This set is probably set to a fixed number, like 25px in another set of rules or style sheets, so when you increase the font size, the line height does not increase with it.

+6
source

You probably have a fixed line-height set installed. Change it both relative (for example, line-height: 1.3em; ), and fixed, but large ( 30px ).

+1
source
 /* user same line-height as as font-size; */ .product{ font-size:30px; line-height:30px; } /* its always a better practice to define line-height in body if you are going to use same font size across or as standard */ 
0
source

All Articles