Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Css reset: font-size: 100%; Why?

Tags:

css

reset

I am studying the css reset of S. Meyer, found here: http://meyerweb.com/eric/tools/css/reset/

My question is: what is the purpose of: font-size: 100%?

Can somebody explain it?

like image 389
Tamás Pap Avatar asked Feb 02 '23 08:02

Tamás Pap


2 Answers

It "Sets the font-size to a percent of the parent element's font size". Therefor if the parent is 14px the child would be 14px based on the setting. It is a way to allow for dynamic resizing of fonts.

like image 161
ScottJShea Avatar answered Feb 04 '23 21:02

ScottJShea


Titles such as H1, H2 etc by default have different font sizes. This rule resets them to what the browser considers the default text size.

like image 27
Joni Avatar answered Feb 04 '23 20:02

Joni