Menu

22 June 2011

Resolution-Free Fonts for HTML/CSS or Scaling font as function of resolution

So finally an evil hack

$("body").css("fontSize", $(window).width() * 0.01 );
       
$(window).resize(function(){
        $("body").css("fontSize", $(window).width() * 0.01 );
});

Set rest of the font-size in percentage.

Demo : http://code.narendrasisodiya.com/web/fonts/

By- Narendra Sisodiya

No comments: