Time for action – setting up an alternative IE stylesheet

Let's set up an IE stylesheet.

  1. In your header.php template file, add the following code after your full stylesheet call:
    <!--[if IE]> 
    <link rel='stylesheet" type='text/css" href="ie-fix.css" 
    media='screen, projection" /> 
    <![endif]-->
  2. Save the header.php file.
  3. Now create a new stylesheet called ie-fix.css and save it to your theme's directory (that is, the same folder your stylesheet is in). This is where any IE-specific CSS will go.

What just happened?

We created a new IE-only stylesheet, and added a conditional tag in the header.php file to call it only when the theme is being run in IE.

The <!--[if IE]> and <![endif]--> tags are essential. The first one checks if the page is being viewed in IE, and the second ends the conditional tag, ensuring that all code after it is run by all browsers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.199.243