0

Yesterday I discovered that FireFox refused to read CSS files that did not have the CSS extension.

I have a basic CSS that's always read, based on the CSS extension (I have a script that automatically loads all CSS files found in the local directory).
Then I had a set of files with the extension .css2, and the script selects ONE of them in a random fashion.
After some trial and error I found that the files were not read as long as they did not have the extension .css.

I found another solution but now I wonder: Is this a standard restriction, or is it just FireFox? (I use 3.0.13).

I use the standard statement:

<link rel='stylesheet' type='text/css' href='filename' />
3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by ingeva
0

I think you will find this is universal - ie. occurs in all browsers.

But it's hardly a limitation. Simply ensure all your css files have the .css extension.

Airshow

0

Browsers don't typically about the extension of a css style as long as the MIME type is correct.
This is sent using HTTP headers, and can be changed using a server-side scripting langage, or an htaccess override for .css2 files.
In your case, the server is seeing css2 as unknown and sending it out as text/plain instead of text/css.
More Information...

0

In your case, the server is seeing css2 as unknown and sending it out as text/plain instead of text/css.

OK, thanks! I just though that my type specification (text/css) would override this.

The easiest solution in my case will be to include these CSS specification in the source (html) file.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.