Font-size property not taking effect in IE 8.0 = extreme frustration...help!

I am unable to get the font-size property working in IE. It works fine in FF. I created a simple bare-bones page to see what is the problem and I have not been able to figure it out. It must be something very basic that I am missing.
Any help would be greatly appreciated.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Component Sort</title>

<style  type="text/css">
	#test p {font-size:40px;}
</style>

</head>

<body>
	<p id="test">this is a font size test</p>
</body>
</html>


I have tried all different types of selectors. I am trying to get it to work for a page that is using an external style sheet, but I created this simple page to see if my syntax was at fault.

You probably mean

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Component Sort</title>

<style  type="text/css">
	p#test {font-size:40px;}
</style>

</head>

<body>
	<p id="test">this is a font size test</p>
</body>
</html>

or

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Component Sort</title>

<style  type="text/css">
	#test {font-size:40px;}
</style>

</head>

<body>
	<p id="test">this is a font size test</p>
</body>
</html>

#test p would look something like this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Component Sort</title>

<style  type="text/css">
	#test p {font-size:40px;}
</style>

</head>

<body>
	<div id="test"> In this there is a<p> this is a font size test </p>test</div>
</body>
</html>

Thank you, but I have tried both of the examples you suggested to no avail.

I have also tried:


p {font-size:40px;}

and


body {font-size:40px;}

No argument here :wink: Just proof. All three examples work just fine.

Would it be a problem with my browser?

I have tried adjusting the text size settings and there is not much difference.
The screen capture was taken at a medium text setting. The zoom is set at the standard 100%

That means you have some weird IE8 settings that don’t allow author CSS rules. Have you tried some colour CSS? Does it apply?

EDIT:
Check Disable menu in the Developer Tools, what about CSS entry, is it having a check mark beside it by any chance?

Wouldn’t #test be <div id=“test”></div>
As u put it as an ID I think you should try
insteed #test this : .test

Yes, as far as I can tell the only property that does not take effect is the font-size.

I am currently running the 32-bit IE under 64-bit Windows 7. I switched to a VM of a 32-bit windows 7 and was able to confirm that the page loads fine in IE.

…I just reset the settings in IE to default and now the page loads fine :wall:

Thank’s for the help!

At some time you probably accidentally set the check box in the browser options in Tools/Options/accessibility/ “Ignore font sizes specified on web pages”. :slight_smile:

Good to know where that option is…it caused me loads of grief…