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 Basics (2014) Understanding Values and Units Rem Units

justin light
justin light
4,921 Points

Why don't I just use REM all the time?

If REM has all the benefits of being relative, but dont have the issue of compounding, why don't we just use REM's all the time? to prevent any issues later?

Or is there a downside to using REM over EM?

Gyรถrgy Varga
Gyรถrgy Varga
19,198 Points

Hi!

Sometimes you want to stick with the same size in all window sizes and platforms, thats why we use px. For example: borders.

REM is relative to the font size of the root element (html element) and EM is relative to the font size of the element on which they are used. But here is more info about this: REMvsEM

Hope this helps!