WordPress.org

Ready to get started?Download WordPress

Forums

conditional ie style sheet syntax (5 posts)

  1. MildlyMystified
    Member
    Posted 5 years ago #

    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

  2. MildlyMystified
    Member
    Posted 5 years ago #

    P.S. I see that I have a typo on the endif. It is correct on the link

  3. stvwlf
    Member
    Posted 5 years ago #

    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]-->

  4. stvwlf
    Member
    Posted 5 years ago #

    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]-->
  5. t31os
    Member
    Posted 5 years ago #

    Also i think this..

    <!-[if IE 7]>

    Should actually be this...

    <!--[if IE 7]>

Topic Closed

This topic has been closed to new replies.

About this Topic