ThemeShaper Forums » Thematic

Conditional Stylesheet

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

Tags:

  1. Deirdre
    Member

    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" />
    <![endif]-->
    <?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!

    ~Deirdre

    Posted 10 years ago #
  2. Deirdre
    Member

    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 =)

    ~Deirdre

    Posted 10 years ago #
  3. Hi,

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

    Chris

    Posted 10 years ago #
  4. Deirdre
    Member

    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,

    ~Deirdre

    Posted 10 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.

    Chris

    Posted 10 years ago #
  6. Deirdre
    Member

    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!

    ~Deirdre

    Posted 10 years ago #

RSS feed for this topic

Reply

You must log in to post.