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

Responsive design and font-size

Does a font-size set to 1em from 16px ever scale down below 16px? If elements are supposed to be proportional how does that work for font-sizes?

2 Answers

The em unit is basted on the font-size of the parent element. This means that the child is always dependent on the parent element and will scale only when it is changed. For your question, the answer is yes. if set the font-size of a parent element to 12px for example, then any of the children elements that use em will change to 1em = 12px.

you should checkout this very useful web typography course that I am currently taking, it's been really great.

https://teamtreehouse.com/library/web-typography/basic-web-typography/fontsizing-px-em-and-rem

and

https://teamtreehouse.com/library/web-typography/basic-web-typography/fontsizing-px-em-and-rem-part-2

But the said parent element of 12px will prevent the font-size from going below 12px in a small display?

Thanks