Typography - Getting The Hang Of Typography

(lu) #1

To k e e p a v e r t i c a l r h y t h m i n C S S , y o u w a n t t h e s p a c i n g b e t w e e n e l e m e n t s
and the line-spacing (leading) to equal the size of the baseline grid. For
example, lets say you՚re using a 15px baseline grid, meaning that there are
15px between each baseline.


The line-spacing would be 15px and the space between each paragraph
would also be 15px. Here is an example


1 body {

(^2) font-family: Helvetica, sans-serif;
(^3) font-size: 12px;
(^4) line-height: 15px;
5 }
6
7 p {
(^8) margin-bottom: 15px;

Free download pdf