5 ms·
Or even better, {max-width: 35em;}
by robert_tweed 10y ago
Or even better, {max-width: 35em;}
- jff 10y agoI do this on my personal site and it seems to Just Work. I specify a max-width for my content, specify font sizes in em values, and it looks fine on every browser I've ever tried, even a shitty Chinese cellphone (not smartphone).
- lucb1e 10y agoWhy is that better?
- Nadya 10y agoIf a user sets their default font size to 26px, then a max-width of 600px may be too small... if a user sets their font size to 10px then 600px may be too wide. A value of 35em would scale the container based on the user's selected font size. Containers should be relative to their content.
- lucb1e 10y agoMakes sense. Thanks!