WordPress.org

Support

Support » Themes and Templates » conditional ie style sheet syntax

conditional ie style sheet syntax

  • What began as a mission to remedy a drop down menu issue in IE for a theme has turned into yet another mystery!

    Inadvertently, I remedied the situation with the drop down menus not being accessible in IE but the placement of the customized horizontal navigation drops lower on IE than on FF. This led me to wanting to have a different style sheet for IE that different padding variables.

    I’ve tried several options and am turning to this forum for help. Here is the syntax currently employed within the theme’s header, in between the <head></head> tags.

    <!-[if IE 7]>
    <link rel=”stylesheet” href=”www.domain.com/iestyle.css” type=”text/css” meia=”screen />
    <![enif]–>

    No matter where I place this if statement, the theme does not seem to be finding it when I am using IE. When I tried Microsoft’s recommendation to also test for not IE, the styling disappeared completely. LOL

    The only thing that I can think of is that this conditional statement needs to be after the </head> tag but I tried that with no good result. Another possibility might be

    Thanks in advance! I’m looking forward to some good help here.

    Marj Wyatt
    Skype: marjwyatt

Viewing 4 replies - 1 through 4 (of 4 total)
  • P.S. I see that I have a typo on the endif. It is correct on the link

    Hi

    I suggest changing the file location of iestyle.css to your theme’s folder.

    I suggest referring to the file location this way in the code: (meia should be media)
    Also, you don’t use href, you use src. If you change that its likely to work but its better practice to put the ie stylesheet in the theme folder, which is where the code below will look for it. One reason is all references to images in a stylesheet are relative to the stylesheet location. If your stylesheets are in different folders, that becomes confusing.

    <!-[if IE 7]>
    <link rel=”stylesheet” src=”<?php bloginfo(‘template_directory’); ?>/iestyle.css” type=”text/css” meia=”screen />
    <![endif]–>

    let me resend as code…

    also you were missing a closing double quote after meia which is your misspelling of media…

    <!-[if IE 7]>
    <link rel="stylesheet" src="<?php bloginfo('template_directory'); ?>/iestyle.css" type="text/css" meia="screen" />
    <![endif]-->

    Also i think this..

    <!-[if IE 7]>

    Should actually be this…

    <!--[if IE 7]>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘conditional ie style sheet syntax’ is closed to new replies.
Skip to toolbar