Support » Themes and Templates » css file for ie7 issues not recognized

  • Hi,
    I have created a child theme from twenty eleven to an rtl website, and since in ie7 things aren’t as they should be, I created an ie7.css file and inserted conditional comments to the head.
    This is the code:

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    <!--[if lte IE 7]>
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/ie7.css" media="screen" type="text/css" />

    Now something must be wrong in the code becauses the ie7.css file is being completely ignored.

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi


    Forum Moderator

    Browser specific CSS is handled a little differently in Twenty Eleven. If you look in header.php, you’ll see the lines:

    <!--[if IE 7]>
    <html id="ie7" <?php language_attributes(); ?>>

    which means that any IE7 specific CSS is handled in the main stylesheet using html#ie7. That’s what you need to add in your child’s main stylesheet.

    I’ve just been trying to work with the child’s main stylsheet (style.css) –
    Tried-#ie7 #branding{} and #ie7 #access{} and that didn’t take, then I tried #ie7 branding{} and #ie7 access{} and that didn’t take either.
    What am I doing wrong now?

    For the benefit of anyone who might encounter the same problem –
    My child theme is RTL. I considered style.css to be my child’s main stylesheet but nothing I did in there took. I discovered that rtl.css is the stylesheet that has to be edited with regards to ie7 issues.
    And of course #ie7 #branding{} and #ie7 #access{} are the correct code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘css file for ie7 issues not recognized’ is closed to new replies.