Support » Themes and Templates » IE 6 Conditional Statetments and IE 6 custom stylesheet

  • I am trying to get an IE 6 conditional statement to work in making my new theme display correctly. I have put this in the header file:

    <!--[if lt IE 7]>
        	<link rel="stylesheet" type="text/css" href="ie6.css" />
        	<![endif]-->

    and uploaded the custom stylesheet to the root directory. What did I do wrong? I cannot get this to work. I placed the conditional statement right before the end of the </head> of the document.

    BNJ

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

    (@esmi)

    Forum Moderator

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

    Esmi,

    Thank you, Thank you, Thank you!

    That worked beautifully. I wish I had asked my question yesterday. I understand now why it wasn’t working, but I do not understand the ‘template_directory’ part. Why not ‘stylesheet_url’?

    BNJ

    esmi

    (@esmi)

    Forum Moderator

    stylesheet_url references your theme’s main style sheet which will always be ‘style.css’ and hence that filename is hardcoded into the resulting link reference.

    template_directory merely outputs the path to your current theme directory – leaving you define the filename and any necessary additional directory names. So you can use to reference additional stylesheets or theme-specific javascript etc.

    Thanks for clearing that up. Now it makes perfect sense. The theme now displays with two columns in IE6 even if the proportions and borders are all messed up. I would love to make it look better but I don’t fully understand what IE 6 is doing to the margins and measurements. [and I don’t think I really want to know what it is doing]

    esmi

    (@esmi)

    Forum Moderator

    Grab a copy of the IETester and you may find out. 😉

    http://www.my-debugbar.com/wiki/IETester/HomePage

    IE6 incorporates an element’s margins into its calculation of that element’s width/height – so tends require proportionally smaller declared widths for a given layout.

    Esmi,

    I am trying out IETester and it is helping me tweak that theme for IE6. The program keeps shutting down or crashing. Is that happening with yours?

    BNJ

    esmi

    (@esmi)

    Forum Moderator

    No – never had a problem with it. It’s still in alpha, so it might be worth filing a bug report.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘IE 6 Conditional Statetments and IE 6 custom stylesheet’ is closed to new replies.