One page uses IE .css file, another doesn't...
BWPanda - May 5, 2009 - 04:07
| Project: | Conditional Stylesheets |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I have setup Conditional Stylesheets on my site and have created an ie.css file for all IE versions. In it, I have the following code:
#footer {
code: red;
}In my site's main .css file, I have the following code:
$footer {
...
color: #ffffff;
...
}The homepage of my site shows white text in the footer, while the about page shows red text in the footer. Studying the code (or trying to) with IE's Dev Toolbar shows that the homepage gets the footer color from the main .css file, while the about page gets it from the ie.css file...
Any ideas why the homepage wouldn't be seeing the ie.css file?

#1
Oops, that first bit of code should read:
#footer {color: red;
}
:)
#2
Do you have a single page.tpl.php or do you have a special page tpl for the homepage?
Do you have css aggregation on/how many stylesheets are loaded on the homepage vs. the sub-pages?
#3
I only have one page.tpl.php file, but multiple node-*.tpl.php and views-*.tpl.php files.
Normal caching mode is enabled, but CSS and Javascript optimisation is disabled.
The site in question is http://brat.info. Currently, it looks like it's not seeing any stylesheets at all, yet other pages do...
Also, I use the Domain Access module, so have other domains affected too, however they seem to look mostly ok. There's a list of them in the left sidebar.
Help! :(
#4
IE has a known bug that will ignore more than 30 style and @import css statements
http://drupal.org/node/228818
you can turn on css optimization
for D6 there is also a module that solves the problem
http://drupal.org/project/unlimited_css
not sure if this is your problem, but a good place to start when css misbehaves in IE
many modules add their own stylesheet, so another page may use a module not used on the page that works... putting the count over the limit.
#5
Yay! Thanks for that!
I had no idea about the IE issue, but that module seems to have done the trick!
Looking at the code, I had about 40 stylesheets loading, so that was the issue. It's also what likely caused the problem with some pages and not others (different number of stylesheets on each).
I still have an issue with the ie.css file not working properly, but I think it's related to: #457124: Unlimited css loader does not work with conditional styles
Marking as fixed.
#6
I did not know a "Conditional Stylesheets" module existed.
I put conditional stylesheet links for IE7/6 in my template file manually. It works.
IMO there are a lot of modules that "automate" relatively simple tasks, and if they are not properly developed, they create more trouble than they save.
I am not surprised that Unlimited CSS does not work with the Conditional Stylesheets module - if they are both processing the style links, it depends on who gets there first. It's like ordering your input filters in a meaningful way. Sometimes you need to make choices.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.