30 December 2013

Solution of Font size problem on different browser

  • Most of the web developers are facing problem with font size on different browser especially on old version of internet explorer.
    different browser
  •  If you are facing font size problem on different browser then this blog post might help you. 
  • Step1: Edit your css code & add the following code:
     Font size problem
  body {font-size:100%;}

  • Step2: Use Em instead of pixel (px) on your css file to specify the font-size value. 1em=16px, To calculate the em value of any pixel, divide the pixel value by 16 . 
  • Example:
p {font-size:1em;}
h1 {font-size:3.125 em;} /* 50px/16=3.125em */
#content {font-size:1.25em;} /* 20px/16=1.25em */
  • Step3. Done. Now your website text will display same on all browsers.
CSS: The Missing Manual

Featured Post

How to Write PHP code and HTML code within a same file

A PHP file can have both PHP code and HTML code together. Any HTML code written outside of PHP <?php //php code here… ?> Code is ig...

Popular Posts