Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPranav Mathur
3,419 PointsWhy is 1.75em smaller than default, even though it should theoretically be 75% larger?
My heading became smaller when I applied the "font-size = 1.75em" rule. Why is that?
2 Answers
Thomas Fildes
22,687 PointsHi Pranav,
It depends on what size the user has the font size as default. Most people do not change the default so commonly 1em equals 16px.
The default size of the <h1> element on my browser (Firefox) is 2em (32px) but it may differ for you because there is no uniform size and it is defined independently by each browser. So when I use 1.75em for the <h1> I have decreased the default size as it will now be 28px not 32px.
Hope this helps! Happy Coding!!!
gianni de luca
16,891 PointsOk I got it. I had the same problem. I'm using google chrome and the default font-size is 16px. 1 em is = to the default size(16px). Try font-size = 16px and then try 1em... is the same. Then if you try 1.75 em the font-size is bigger because is .75 bigger than 1 em. Is confusing because the h1 tag gives the text a bigger size. But 1 em = 16px (chrome browser)
web pad
4,483 Pointsweb pad
4,483 PointsThank you for this info. Where should we able to know the default browser font size settings for our browser? I have google chrome. It will really be helpful to know our browsers default settings.