Support » Plugins and Hacks » IE Hacks

  • Hey,

    I made a new wordpress theme for a site I’ve been working on and it’s not displaying properly in IE. So I placed this code into my header.php document:

    <!--[if lte IE 7]>
    	<link rel="stylesheet" type="text/css" href="ie.css" />
    <![EndIf]-->

    When I view the site in internet explorer it still links to the default style.css document.

    Is there a way to change this so that it links to my desired file when view the site in Internet Explorer?

    Thanks!

    Also: how can I change the default CSS file location, to something other than style.css in the major directory?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey,
    With this code, the ie.css is loaded additionally to style.css
    I would suggest to use ie.css only for elements that do not display correctly in IE.
    ie.css overrides style.css.

    This code isn’t working at all though, style.css is loading instead of ie.css when viewing the site in Internet Explorer.

    what’s the URL of your site?

    Jeremy Clark

    (@jeremyclark13)

    Member

    @trueskool:
    You need to load your regular style sheet then load the IE only stylesheet so the ie only rules take precedence over rules in your regular style sheet.

    <link rel="stylesheet" type="text/css" href="style.css" />
    <!--[if lte IE 7]>
    <link rel="stylesheet" type="text/css" href="ie.css" />
    <![EndIf]-->

    This is what it should look like.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘IE Hacks’ is closed to new replies.