Support » Fixing WordPress » CSS and Mozilla

  • I have a problem with CSS and mozilla that I don’t think is strictly WordPresses problem. I suspect it is something to do with mime.types but I’ve updated the apache entry to make css files text/css.
    If I embedd the style like this then it appears fine.
    See for the normal problems. IE does not have the problem (because it is barely standards aware!)
    This is so far a problem only with Mozilla (and gecko) browsers. If you have any suggestions I’d appreciate them.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Your web server is serving up your CSS file as MIME type ‘text/plain’ instead of ‘text/css’.
    Try creating an ‘.htaccess’ file with this line in it:
    AddType text/css .css

    Thanks dougal. At 4am local time NOTHING was working. This morning I removed and re-applied my httpd.conf changes it suddenly started working after 30 mins.
    I even tried the .htaccess file and it didn’t “take” last night either.
    For people searching the forum in the future (I wont be the last), dougal correctly identified the problem.
    Browsing directly to the css file in Mozilla and looking at Page Info (Ctrl+I) shows the type.
    1) If you control your server
    2a) If you don’t controll your server, tell your server admins to configure css files as type text/css
    2b) Until your admins do that use dougal’s .htaccess workaround

    I just solved the same issue with Gecko-based browsers not displaying CSS styles in XHTML files:
    On our virtual private server, the MIME types are controlled by a file called mime.types, which is in the same directory as the httpd.conf file.
    Found the precise coding here:
    Add this to the mime.types file:
    text/css css
    then restart apache.
    Presto, fixed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSS and Mozilla’ is closed to new replies.