Home ›
Font sizing with rem - Snook.caFont sizing with rem - Snook.ca
Submitted by Benjamin Melançon on November 8, 2011 - 7:37pm
Link Title and URL:
Font sizing with rem - Snook.ca What do we do for browsers that don't support rem units? We can specify the fall-back using px, if you don't mind users of older versions of Internet Explorer still being unable to resize the text (well, there's still page zoom in IE7 and IE8). To do so, we specify the font-size using px units first and then define it again using rem units.
html { font-size: 62.5%; }
body { font-size: 14px; font-size: 1.4rem; } /* =14px */
h1 { font-size: 24px; font-size: 2.4rem; } /* =24px */
Comments
Post new comment