Search code examples
htmlcssfont-size

Font appears bigger in IE8 and IE9


I don't understand why the fonts are bigger in IE8 and IE9. I am using Helvetica font. All other browsers are okay. I got problem only in IE8 and IE9. The line-height is also bigger. I cannot post the Link to my site here for some reason. But it's really simple use of css. Here is how my HTML header looks:

<!DOCTYPE html>
<html lang="se">
<head>
    <meta charset="utf-8">
    <title>Digi...</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />

    <link rel="shortcut icon" href="/resources/layout/favicon.ico" type="image/x-icon" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">

</head>

Solution

  • If this is truly vital, and you do not mind using Conditional Comments to send IE-targeted CSS to the browser, you can create a Conditional Comment stylesheet for IE like:

    <!--[if IE 9]>
        <link rel="stylesheet" type="text/css" href="/ie9.css" />
    <![endif]-->
    

    Otherwise, a good first step is to always use a CSS Reset to normalize between browsers. Commonly used resets is YUI.

    see this: http://yuilibrary.com/yui/docs/cssreset/