theYinYeti Posted October 16, 2002 Report Share Posted October 16, 2002 This concerns Mozilla 1.0 on Linux, as well as Mozilla 1.0 and 1.1 on Win2K. I created my personnal web site. I tested it at home with Apache of course. It works well. I tried to do it very much W3C-compliant, so I used a lot of CSS (while still making sure it works without CSS). My problem is that my site, once FTPed to my provider, stops loading CSS! So I looked at Mozilla's "Javascript console", and here are messages I get: Error: The stylesheet http://.../main.css was not loaded because its MIME type, "text/plain", is not "text/css". Error: The stylesheet http://.../mainmenu.css was not loaded because its MIME type, "text/plain", is not "text/css". The strange part is that I made another site at work, for which I get this: Warning: The stylesheet http://.../index.css was loaded as CSS even though its MIME type, "text/plain", is not "text/css". So obviously, both sites are not treated equal. I tried to find differences, and here's all I found: On my personnal site, page begins with <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html> and the CSS link is defined <link href="../_css/main.css" rel="stylesheet" type="text/css" /> in XHTML notation, whereas on my test site at work, page begins directly with <html> and the CSS link is defined <link rel="stylesheet" type="text/css" href="index.css"> in HTML notation. Question: does anyone know how to force mozilla to always accept "text/plain" files as CSS files? I tried convincing my provider to reconfigure their web server to give a correct MIME type to CSS files, but to no avail (because there's no problem with Netscape 7, they say). Yves. Quote Link to comment Share on other sites More sharing options...
bradcarter Posted October 16, 2002 Report Share Posted October 16, 2002 does your host allow .htaccess ? If so you can use .htaccess to make the mimetype yourself I think AddType text/css css Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted October 17, 2002 Author Report Share Posted October 17, 2002 Thanks, I'll try. I have to try myself, because my provider's support are all newbies :lol: When I talked to them about MIME types errors in the logs, they asked me what is a MIME, what is the URL of the logs I'm talking about, can I explain better please, and what is the URL of the page that gives the error. Yves. Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted October 18, 2002 Author Report Share Posted October 18, 2002 Sad... the .htaccess file had no effect even on my own Apache (it is enabled in the config file...). Anyway, no problem anymore. With XHTML, CSS files are required to be text/css (that's perfectly normal), and with HTML, CSS are allowed to be anything (more permissive). I looked at my Apache config, and indeed, CSS files are of MIME type text/css, as they should be. I changed this config to text/plain, and I perfectly reproduced my problem (I set it back to normal after). As my provider seems to be totally deaf and blind to W3C standards, I finally removed the DOCTYPE thing from all my XHTML files, and now things work well. Yves. BTW: what do you think of my site? Not so much the content (can you even read French?), but rather layout and colors. PM me :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.