Results 1 to 4 of 4

Thread: Firefox Error: <body> This element has no style rules.

  1. #1
    Join Date
    Aug 2010
    Location
    Jacksonville, FL
    Posts
    85
    Thanks
    31
    Thanked 0 Times in 0 Posts

    Default Firefox Error: <body> This element has no style rules.

    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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The stylesheet:

    Code:
    <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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Elbee (11-10-2010)

  4. #3
    Join Date
    Aug 2010
    Location
    Jacksonville, FL
    Posts
    85
    Thanks
    31
    Thanked 0 Times in 0 Posts

    Default

    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!

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    Last edited by jscheuer1; 11-10-2010 at 07:56 PM. Reason: add detail
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •