CSS CSS and Font Size - Best Practices

On my CSS website, I use EM, PX, PT, and Percentages to set font sizes.

I also use jQuery UI which uses EM.

Now I come to the point where I need to change the font size a little less.

Overall, what is the best way to reduce the font size a bit, and should I change how I make the font size, in whatever way?

Everyone seems to have a different opinion on this topic.

+5
source share
3 answers

. , :

body{font-size:11px;} 1em = 11px

em :

a{font-size:1em;} , h1{font-size:2em;}

, , , :

body{font-size:13px;} ..

,

+13

em , IE .

Currently, all browsers perform full-scale page scaling, not just text, so it doesn't matter. I would recommend using px as it gives you good control.

+4
source

All Articles