I can't work out how to get conditional stylesheets working.
I followed the instructions here: http://drupal.org/node/477920
I created the stylesheets, added them to the .info file for the subtheme.
I refreshed the theme registry (using admin menu link).

They don't show in IE7.
I turned off css caching so I could see the list of stylesheets (less than 20)
The conditional sheets do not appear in IE7.

This in the .info file:
stylesheets[all][] = css/blocks.css
stylesheets[all][] = css/comments.css
stylesheets[all][] = css/nodes.css
stylesheets[all][] = css/page.css
stylesheets[all][] = css/style.css
conditional-stylesheets[if lt IE 7][all][] = css/ie6-and-below.css
conditional-stylesheets[if IE 7][all][] = css/ie7.css

All these stylesheets are in a subtheme folder.

I tried installing and enabling the conditional stylesheets module, but this did not help.

Any help would be much appreciated.
Cheers
Miriam

Comments

Jeff Burnz’s picture

Well assuming you have these stylesheets in the /css folder then I don't really know.

By default in the Genesis subtheme there's an IE css file included here:

genesis_SUBTHEME/css/ie/ie-example.css

and in the info file there is:

conditional-stylesheets[if lte IE 7][all][] = css/ie/ie-example.css

I've never had to much of a problem with this.

Note: you do NOT have to install the module, its included in Genesis, also there is no browser sniff/detection so the conditional comments will show in any browser.

HTB’s picture

Category: support » bug

seems its happening across alot of themes. in this post #698510: conditional stylesheets not added when using page.tpl.php it's affecting zen too. My own custom theme is also facing the problem.

dealancer’s picture

Title: Conditional stylesheets for IE » There is also another way to have Conditional stylesheets

You also could use Conditional-CSS Integration module, which allows you to use css in a way like this:

/* Conditional-CSS example */  
a.button_active, a.button_unactive {  
  display: inline-block;  
  [if lte Gecko 1.8] display: -moz-inline-stack;  
  [if lte Konq 3.1] float: left;  
  height: 30px;  
  [if IE 5.0] margin-top: -1px;  
    
  text-decoration: none;  
  outline: none;  
  [if IE] text-decoration: expression(hideFocus='true');  
}  
Jeff Burnz’s picture

Title: There is also another way to have Conditional stylesheets » Conditional stylesheets for IE

Restoring title, please respect the OP's question regarding the Conditional Styles module which is built into this theme.

dealancer’s picture

sorry

jlbretton’s picture

This is the way I found make work Conditional Styles module.
My original explanation: http://drupal.org/node/698510#comment-3240306

a. You need your base theme with the radio button "enabled" check off. "Default" won't be enough, even if your theme seems to work.
b. If you are enabling the theme back or reset to default your theme, it won't work back neither. The solution beeing to manually delete the conditional_stylesheets variable (with Devel or directly on your db) and then only, check off "enabled" the base theme. In this case the module will read and write back in the db the variable wich will make correctly work the module. If for some reason, you deasable the base theme again, you will have to redo all those manipulations.

Hope this help.