• Resolved cmw000

    (@cmw000)


    How does one include a conditional statement to include css in a wordpress template?

    I’m having a few minor issues with IE7, but I’ve found that adding

    <!–[if IE 7]>
    <link rel=”stylesheet” href=”ie7.css” type=”text/css” media=”screen” />
    <![endif]–>

    in the head of my document does not work. Any tips on how to tweak for various browsers?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try placing in header.php after all functions, including the_head().

    Or this:
    <!--[if IE 7]>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory') ?>/ie7.css" type="text/css" media="screen" />
    <![endif]-->

    Thread Starter cmw000

    (@cmw000)

    Thank you. 🙂 The code you posted is right. You need to reference the css directory that way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘conditional css’ is closed to new replies.