Why is it that if I do font-size:70px or 120px, the distance between the top and the text increases?
EDIT : Apparently, I fixed it by changing the line-height.
Is there a default line-height?
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.
As you haven’t shown any code I will make the assumption that you’re not using any styles beyond:
Every browser has a different default stylesheet, so the actual values may vary.
Typically the default
line-heightis1emor100%(same thing). On certain elements such aspandh#, there is a top and bottom margin by default. Forptags, the margin is1emand forh#it varies widely (1.5emforh1,1.25emforh2etc).emand%values are based off of the font-size. If you have a paragraph element with a font-size of30px, by default it will have a30pxtop and bottom margin.