WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress IE6 CSS not working! (5 posts)

  1. eds-danny
    Member
    Posted 2 years ago #

    Hello.

    I have a WordPress site and I need to modify some little problems in IE6 and I don't know why IE6 can't view my "IE6.css" file.

    The file is stored correctly in the same folder as style.css and also the code is written well. The difference I saw is that, when I try to modify something from "IE6.css", it render only in other browsers than IE6 ! And this is strange!

    Here is the code:

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    
    <!--[if !IE 6]><!-->
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/IE6style.css" type="text/css" media="screen" />
    <!--<![endif]-->
  2. eds-danny
    Member
    Posted 2 years ago #

    Ah solved the problem.

    First you need to type the general css, and then the IE6 exception.

    I typed incorrectly the code:

    <!--[if !IE 6]><!-->
    <!--<![endif]-->

    Correct code:

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    
    <!--[if lte IE 6]>
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/IE6style.css" type="text/css" media="screen" />
    <![endif]-->
  3. lockettpots
    Member
    Posted 2 years ago #

    Your conditional code actually reads 'if this isn't IE6 then use this stylesheet

    you also have the comment tags wrong

    <!--[if IE 6]>
    Special instructions for IE 6 here
    <![endif]-->

  4. eds-danny
    Member
    Posted 2 years ago #

    Thank you sir. I figure that now.

  5. lockettpots
    Member
    Posted 2 years ago #

    Sorry hadn't seen your second post when I posted

Topic Closed

This topic has been closed to new replies.

About this Topic