A script I'm trying to use to randomly rotate the background image in my site's header requires me to add the line:
echo "<style type='text/css' media='screen'> @import url('......[path ]....../dynamic_css.php'
;</style>\n";
between the <head> tags of the v7 header template. This works fine in Internet Explorer, but Firefox wont load the script from "dynamic_css.php" because it reads the MIME type as "text/html" not "text/css":
Error message: "The stylesheet "......[ path ]....../dynamic_css.php" was not loaded because its MIME type, "text/html", is not "text/css"."
The script includes a line which should tell the browser what type of file is being sent, but Firefox, Chrome, Safari, Opera etc. don't get the message:
// tell the browser what we're sending
header('Content-type: text/css'
;
I can get round this by declaring the style element twice, once inside the <head> tags and once outside. The random rotation script then works OK in all the browsers, but it screws up the page layout in Internet Explorer and also has a knock on effect on the CSS Dropdown Menu, which I also use (see
www.rnsyc.net).
It's a case of "nearly but not quite", but I don't understand enough to see how to resolve it (except by waiting for Happy Svensson to include bg image rotation in the next version of his HappyAccidents theme :-)).
robbie