View Full Version : Firefox Error: <body> This element has no style rules.
Elbee
11-10-2010, 03:34 PM
Hello,
The page displays fine in IE7 and IE8; however, it is horrible in Firefox.
[URL]http://jpl.coj.net[URL]
Error response is: <body> this element has no style rules.
This is the code I have in the <head> section:
[code]<link href="http://jpl.coj.net/common/styles/layout.css" rel="stylesheet" type="text/css"/>[code]
I have been unable to figure out what is wrong.
I'd appreciate any help you could give me. Thank you.
jscheuer1
11-10-2010, 04:17 PM
The stylesheet:
<link href="http://jpl.coj.net/common/styles/layout.css" rel="stylesheet" type="text/css"/>
is being served as text/html, not text/css as the tag designates. As a result the problem browsers aren't loading it. The server side directive for this could be in the basic server configuration, or in a .htaccess file. There are other possibilities, those two are the most likely. It is something on the host though.
If you need more help on it, contact your host. Tell them what I just told you.
Elbee
11-10-2010, 05:20 PM
Thanks as always John. A co-worker saved the file on a different server and it displayed corrrectly...which it should not have. So as usual you are right...it's the host...God knows what they have done!
jscheuer1
11-10-2010, 05:38 PM
Well, depending upon your hosting package, you may have the access required to change this, either through an online interface that the host provides or via access to use .htaccess files. The host can tell you if you do not know. What you want to set is the mime type for the this type of (.css) file. It should be set to text/css.
It's possible that when the file was uploaded, depending upon how that was done, that the mime type could have been set then. If so, delete the file and upload it again as the proper mime type.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.