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) Enhancing the Design With CSS Adjusting the Layout with Media Queries

mrx3
mrx3
8,742 Points

Why did Guil use rem instead of em in the media query?

In the title Guil used 1.3 rem for the font size, and 5 rem for the h1 font size. Why not just us em? Thanks for any answers.

1 Answer

Dominik Sikiric
Dominik Sikiric
2,059 Points

with rem or root em you can have more consistency and it is easier to follow because it is relative to root size. You could use em also, but it is relative to parent element so you should be careful. IMHO- I am still beginner ;)

mrx3
mrx3
8,742 Points

Thank you for the reply Dominik.

Dominik Sikiric
Dominik Sikiric
2,059 Points

you welcome. If you are satisfied with answer feel free to click on best answer, not just at this topic but on any other :)

mrx3
mrx3
8,742 Points

Selected the best answer. Sometimes I wait a day or two to select the best answer, because I want to see what other have to say. Thanks again for the help Dominik.

Doug Tvedt
Doug Tvedt
5,354 Points

This is a good answer, but why weren't rems used in the rest of the CSS? In this class, they were only used in the media query.

Jared Hensley
Jared Hensley
8,106 Points

Yes, I feel like the use of rems vs ems could be better explained for sure. Also, explaining why you are doing certain things would be beneficial as well. Some insight on your design style and concepts would be really beneficial! Thank you for the videos.