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

Error in em definition ?

Hi, you define em as "1em is equal to the font size value of the parent element".

But this is not exact ... or better it is exact only if in the element there is not a font size declaration and so it is inherited from the parent.

More precisely "1em is equal to the element's font size" (element not the parent element)

body { color: #878787; margin: 0; font-size:16px; }

h1 {
font-size: 48px; color: red; border: 1em solid red; }

The border size will be 48px (the element font size) not 16px (the parent's element font size).

Thank you

a