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 Foundations Values and Units Absolute Length Units

Edwin Zhang
Edwin Zhang
3,518 Points

How the DPI affects the px and those physical units

IMHO, 1 px = 1/96 in just when the DPI is 96 DPI. and why different browsers don't have difference when display these absolute units example in the project file? Is the default DPI 96 in all these browser including retina mobile broweser?

1 Answer

Because many displays tweak their ratio to be consistent (making it all the more confusing). For instance, Retina displays treat 1px as one traditional pixel, yet 1 traditional pixel is equivalent to at least 4 Retina pixels. The Retina display just automatically scales it up.

Edwin Zhang
Edwin Zhang
3,518 Points

So all browser set default DPI to 96, then retina fake it just scaling it?

Sort of. All browsers set their default DPI (to 96, I guess), but Retina displays act like their DPI is 96, even when it is 4x that.