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
Anna Matviyenko
4,250 PointsHaving a hard time understanding em units and I can't pass the challenge.Why can't we just use % if we need to scale?
Hello everyone,
Sorry if my question is silly. I am new to this course and so far everything made sense to me, but I'm stuck here with em/rem units. Can someone explain on a simple example the relation between em, px and %? I've watched the video a few times and still can't quite get it.
Thank you.
1 Answer
Ted Sumner
Courses Plus Student 17,967 PointsFor some reason they did not add % to formatting text. The difference between rem and em is the reference point. em references the parent element size. rem references the root font size.
Em is used because of control issues, but I can see where rem could also be very good. And that difference may be the reason that they do not use %. There would be no control over reference point.