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 trialHarsha Vardhan Sannareddy
5,734 PointsWhat is the rem measurements. most of the times I have seen people using either px or %. Is there any specific reason
Is there any specific reason that you are using rem as measurement rather than px or percentage ?
2 Answers
Steven Parker
231,236 PointsThe "em" and "rem" measurements are based on font sizes, where percentages ("%") are based on the window (or parent object) size. The choice would usually be based on whether you are sizing something for text or images.
A pixel ("px") measurement is for when you don't want the size to be responsive to either screen or font sizes. It will always take up the same space.
Harsha Vardhan Sannareddy
5,734 PointsThank You !!
Susan Furest
783 PointsSusan Furest
783 PointsI would also note that usually there is an established rem size of 1 for standard paragraph text within a company's front end style guide. Say its 16px. You can change the css from 1rem to .875rem to get a font size of 14px. Designer's usually don't spec out front sizes in rem, but they can be coded that way!