I have the following in my page.tpl.php

  <!--[if IE 6]>

    <?php if ($subtheme_directory && file_exists($subtheme_directory .'/ie6.css')): ?>
      <link rel="stylesheet" href="<?php print $base_path . $subtheme_directory; ?>/ie6.css" type="text/css">
    <?php else: ?>
      <link rel="stylesheet" href="<?php print $base_path . $directory; ?>/ie6.css" type="text/css">
    <?php endif; ?>

  <![endif]-->

The above code is mostly based on http://drupal.org/user/254346. I have also tried modifying the code to read as

 <!--[if IE 6]>
    <link rel="stylesheet" href="<?php print $base_path . $directory; ?>/ie6.css" type="text/css">
    <?php if ($subtheme_directory && file_exists($subtheme_directory .'/ie6.css')): ?>
      <link rel="stylesheet" href="<?php print $base_path . $subtheme_directory; ?>/ie6.css" type="text/css">
    <?php endif; ?>
  <![endif]-->

or

endif;


The above code is mostly based on http://drupal.org/user/254346. I have also tried modifying the code to read as

 <!--[if IE 6]>
      <link rel="stylesheet" href="<?php print $base_path . $subtheme_directory; ?>/ie6.css" type="text/css">
  <![endif]-->

There is a custom page.tpl.php file in the Zen subtheme and the ie6.css file exists in the correct sub theme folder yet none of the changes in the stylesheet is applied in ie6. The changes applied to the built in ie.css works fine but if I need to apply a change only to ie6, it just doesn't seem to be working.

Comments

stevebayerin’s picture

Somehow while copy/pasting or uploading there was extra text. Please ignore:

<?php
endif;
?>

The above code is mostly based on http://drupal.org/user/254346. I have also tried modifying the code to read as

echoz’s picture

Your examples should work (for drupal5), unless you've just happened to reach ie's limit of 31 stylesheets. Are you using a lot of stylesheets, or many modules that have their own stylesheets? If so, search around for solutions being worked on for this, enable CSS aggregation (not good during development) or consolidate some css.

stevebayerin’s picture

Thanks echoz,

That could be it. I can manually verify there are 29 style sheets in use. That could be why.

mike stewart’s picture

Status: Active » Closed (fixed)

seems this was resolved