Hacker News new | ask | show | jobs
by dpark 4787 days ago
This is a solved problem.

   max-width: 600px;
This stops your text from being excessively wide, but also doesn't prevent smaller screens from making it more narrow.
1 comments

Thats a pretty good way, but it's not dpi independent.
That's partially true. A CSS pixel isn't necessarily the same as a screen pixel. A Mac with a retina display set to "native" resolution, for example, should actually make that 1200 pixels wide (max). In general, though, I think most browsers will treat a css pixel as a screen pixel.

Of course you could also use points or ems if you prefer.