Using the CSS font-size property, one can specify the size as a percentage. What does this percentage refer to?
Using the CSS font-size property, one can specify the size as a percentage. What
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The percentage refers to the size percentage of the elements parent. I think the default browser font size is 14px, so:
It starts to get a little more complicated if you have this:
Since I set a pixel size for the parent div, and a percentage size for the child paragraph, the child paragraph uses the parent pixel size as the base measurement.