public marks

PUBLIC MARKS from greut with tags html5 & css

02 May 2011 06:00

Font sizing with rem

by 4 others

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 */

greut's TAGS related to tag html5

app +   blog +   book +   comet +   content +   css +   css3 +   douglas crockford +   ECMAScript +   event +   flash +   html +   iphone +   javascript +   opensource +   opera +   php +   w3c +   web +   work +   xml +