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 How to Make a Website Styling Web Pages and Navigation Build Navigation with Unordered Lists

Arsalan Raja
Arsalan Raja
6,508 Points

How to calculate em value relatively to px?

How to calculate 1.75em to px

1 Answer

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,242 Points

Em values are relative values, meaning there has to be a base value. The default font size if no value is otherwise specified is 16px, so 1.75 em would be 16 * 1.75 or 28px. It's worth noting, however, that em values are proportionate to the context in which they are set, so if you have a div where you have set font-size: 30px;, 1.75em in that situation would be 52.5px.