Reputation: 3
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
Reputation: 10772
Make sure your zoom in IE9 is set to 100%. To do this, Hit CTRL + 0 while in the browser.
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;
}
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
Reputation: 78
I think your CSS is overridden with you browser settings. Check the accessibility settings of the browser.
Upvotes: 1
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