ThemeShaper Forums » Thematic

Conditional Stylesheet

(6 posts)
  • Started 12 years ago by Deirdre
  • Latest reply from Deirdre
  • This topic is not resolved


  1. Deirdre

    So, IE6 is not playing nice- big shocker, I know. Anyway, I've been reading up on conditional css, and from this site I found:

    function childtheme_iefix() { ?>
    <!--[if lt IE 8]>
    <link rel="stylesheet" type="text/css" href="<?php echo bloginfo('stylesheet_directory') ?>/ie.css" />
    <?php }

    add_action('wp_head', 'childtheme_iefix');

    A few questions:

    1.) I put the IE css in Thematic's style folder, correct?

    2.) Where do I place the above code - in function.php?

    3.) I am not using the child method of Thematic, so what should the opening line of the above code read (aside from me changing it to IE6)?

    Ive tried every variation I can think of with the above code and with other code suggestions I found around the web, so I'm submitting to failure and asking here =)

    Thank you!


    Posted 12 years ago #
  2. Deirdre

    Oh - this just occured to me - Thematic uses multiple style-sheets, so I would also need to reference not only one css, but all of them, correct? My assumption would be that I'd need to call up a second style.css and then within that reference multiple ie6 compliant style-sheets(typography.css, default.css, etc.)

    Thank you =)


    Posted 12 years ago #
  3. Hi,

    no .. you include only the hacks in your ie6.css. It'll be loaded in addition to your style.css.


    Posted 12 years ago #
  4. Deirdre

    Thanks Chris!

    In reference to the first question, though do I put the hack in the the root thematic folder? And where do I place the statement above - in function.php or in the header? I've tried a few methods, but not sure if I'm doing it correctly.

    Thanks a ton,


    Posted 12 years ago #
  5. Ok .. but only if you promise to create a child theme the next time :)

    ie6.css is located in the Thematic directory. The php code should be added to the functions.php.


    Posted 12 years ago #
  6. Deirdre

    I promise! =)

    When I started coding this, I wasn't aware of the child themes (the theme was installed by the client). I figured out about the child themes when I was already waist high in styling, and it's kind of bit me in the butt since a lot of help is regarding child themes *le sigh*

    But next time, yes, next time, I will create a child theme BEFORE I do anything else ;)

    Thanks - you're a charm!


    Posted 12 years ago #

RSS feed for this topic


You must log in to post.