Kyle Derpina
Kyle Derpina

Reputation: 3

Font size not working at all in IE9

Changing the font size with CSS is just not working in IE9. The font will change but the font size will not. It works perfectly in chrome and firefox. I tried to use em,pt instead of px. i tried font-size:40px. i tried everything.

The font size will just not change.

<!DOCTYPE html>
<html lang="en">
<head>
<title>test</title>
<meta charset="utf-8">
<style type="text/css">
body{
    font: 40px Arial;
}
</style>
</head>
<body>
    font size test
</body>
</html>

Upvotes: 0

Views: 3346

Answers (4)

Axel
Axel

Reputation: 10772

  1. Make sure your zoom in IE9 is set to 100%. To do this, Hit CTRL + 0 while in the browser.

  2. Make another CSS definition is not overriding your font-size statement. You can even force the font size by using the !important attribute like this:

    body {
      font-size: 40px !important;
    }
    
  3. Make sure you are clearing your cache when you refresh the page. To do a cache-free reload of a page, Hit CTRL + F5 in your browser. This will flush the cache and reload the page completely.

As far as the code you posted, I copy/pasted it as is and it works as intended in IE9. You may want to reinstall IE on your computer if you still can't get it working.

Upvotes: 0

Ravinder
Ravinder

Reputation: 78

I think your CSS is overridden with you browser settings. Check the accessibility settings of the browser.

Upvotes: 1

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201658

If you have tested this with the exact document you posted, then apparently your IE 9 is broken. Re-install it. Otherwise, please post a complete example code or a URL that demonstrates the problem.

Upvotes: 0

Peter
Peter

Reputation: 16933

body {
    font-size: 40px;
    font-family: Arial;
}

Upvotes: 0

Related Questions