Jump to content

[SOLVED] Dynamic CSS file ignored by Firefox


SammyP

Recommended Posts

I am unable to get my style sheet to work in Firefox. It has nothing non-standard, but it does change depending on some system variables, so it is a php file.

 

In IE, both of the following work:

 

<link rel='stylesheet' type='text/css' href='style.css' />

<link rel='stylesheet' type='text/css' href='style.php' />

 

But in Firefox the latter one gets ignored.

 

Does anyone know why, or a way around this? I could try to get my server to parse .css files I guess, but it shouldn't be necessary. I am not sure how I could do that anyway.

 

Sam.

 

Link to comment
Share on other sites

Why would you even use a php ext. for a style sheet?

 

A style sheet should not have anything in it but text.

 

But if you have a php file with sniffers for certain variables, then have that called elsewhere but not using the <link rel='stylesheet' type='text/css' href=> link.

 

See what it says when you run it through the html validator at http://validator.w3.org/

Link to comment
Share on other sites

Thanks for that.

 

All of the style sheet items are held in a database, so the style.php file looks just like a css file, but it is being generated on the fly. I guess there is no reason why it couldn't be inserted into the header rather than being external. Is that what you mean?

 

The validator had no problem with that line. Didn't like a lot of the other ones though!

 

Sam.

 

 

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.