Forums

IE 6 Conditional Statetments and IE 6 custom stylesheet (8 posts)

  1. BestofNJ.com
    Member
    Posted 2 years ago #

    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

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    <!--[if lt IE 7]>
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/ie6.css" media="screen" type="text/css" />
    <![endif]-->
  3. BestofNJ.com
    Member
    Posted 2 years ago #

    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

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    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.

  5. BestofNJ.com
    Member
    Posted 2 years ago #

    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]

  6. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    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.

  7. BestofNJ.com
    Member
    Posted 2 years ago #

    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

  8. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic