- Most of the web developers are facing problem with font size on different browser especially on old version of internet explorer.
- 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:
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.