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 trialjemelleesantos
3,495 PointsEm vs. px
Is there a breakdown or a compare/contrast article on ems and pxs?
I still can't quite understand his explanations of what ems are. I've always used px in the past and em is new to me.
4 Answers
Andrew Stelmach
12,583 PointsGood explanation here: http://css-tricks.com/why-ems/
Dustin Matlock
33,856 PointsIn simplest terms, ems
are a scalable unit of measurement, whereas pixels are more of a physical measurement, and more to do with the monitor or device.
A pixel is a physical point in a raster image, or the smallest addressable element in an all points addressable display device; so it is the smallest controllable element of a picture represented on the screen. —Wikipedia
In Cascading Style Sheets, the "em" unit is the height of the font in nominal points or inches. The actual, physical height of any given portion of the font depends on the user-defined dpi setting, current element font-size, and the particular font being used. To make style rules that depend only on the default font size, another unit was developed: the rem. The rem, or root em, is the font size of the root element of the document. Unlike the em, which may be different for each element, the rem is constant throughout the document. —Wikipedia
Argzon Haziraj
Courses Plus Student 14,994 PointsI'm also interested in this information about ems . I'm looking forward to learn more about the difference between ems and px .
jemelleesantos
3,495 PointsThanks everyone!
Dustin Matlock
33,856 PointsYou might also check out Type Scale. Many thanks to Mattox Shuler and his Web Typography course.
mrx3
8,742 Pointsmrx3
8,742 PointsGoogle has a bunch A http://www.impressivewebs.com/understanding-em-units-css/ Good article here. Hope this helps