Hacker News new | past | comments | ask | show | jobs | submit login

em or relative font-sizing seems like a good choice. Also see rem [1] which was introduced with CSS3 to combat issues with font size compounding. Use pt for print stylesheets [2].

For a bit of ancient internet history: http://style.cleverchimp.com/font_size/points/font_wars.GIF

[1] http://snook.ca/archives/html_and_css/font-size-with-rem

[2] http://www.w3.org/Style/Examples/007/units.en.html




The rem unit is awesome! All the benefits of em (relative to browser text zoom level) combined with the benefits of px (does not change depending on parent element font size).

If you don't need to support IE8 you should start using rem today.


But note that px is also relative to the zoom level, as unintuitive as that sounds.


Not to the text zoom level.


modernizr + css-remunit polyfills and you can start using rem today. :)




Consider applying for YC's first-ever Fall batch! Applications are open till Aug 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: