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 trial

CSS CSS Foundations Text, Fonts, and Lists More Text Properties

width of my h1

Hello,

I gave h1 a width of 17.5em. My web console shows the dimensions of my h1 as 672 x 58

Would you happen to know how 17.5em calculates to 672px

<!DOCTYPE html>
<html>
<head>
    <title>More Text Properties</title>
    <style>
    body{
    padding:1em 6em;
    font:1.2em/1.5 sans-serif;
    background-color: #dfdfdf;
    }
    h1{
    background: #FFF;
    width: 17.5em;


    }
    </style>
</head>
<body>
    <h1>Let's Have Fun With Text Shadows!</h1>
</body>
</html> 

2 Answers

672px = 42.000em so if 1em = 16px then 17.5em = 280px

So, shouldnt the browser console show 280px, why does it show 672px?

Cheers!

I responded on your most reason posting.