views:

297

answers:

4

Hi,

I have to following code fragment, and no matter what I set the font-size to, IE7 doesn't listen at all! All other browsers are working fine. Any ideas?

<html>
<head>
    <title>Test</title>


    <style type="text/css">
        * {margin:0;padding:0;font-size:3em;font-family:Arial;}

    </style>

</head>
    <body>
        <h1>A heading goes here</h1>
    </body>
</html>
+1  A: 

It should work on every (decent) browser including IE 7.

I imagine it is an accessibility setting with your Browser, possibly:

Tools -> Options -> General tab -> Accessibility -> "Ignore font sizes specified on pages".

Cerebrus
A: 

Try the following:

a) Use firebug to inspect the style. Overridden styles are struck out in the style view in the right firebug pane when inspecting an element.

b)

font-size: 3em !important;

c) Try setting the style on the element directly for now, just to test with

<h3 style='font-size: 10em;'>Test</h3>
Antony Carthy
A: 

The unit "em" is relative to the current font size. Since you install the size for all elements, which template should IE use?

You must specify either the list of elements where the style should apply or use a class.

Aaron Digulla
A: 

try to use commonly used reset.css. * selector will slow down rendering your page. You generally need to reset elements that display as block. http://960gs.com can help you for this purpose.