• Hi all,

    I am getting an error at the top of my blog that says:

    <!–[if lt ie]> <![endif]–>

    Does anybody know how to fix this? The error can be seen when using Internet Explorer on https://www.friscofauxcreations.com . The error does not show up on Firefox. Also, the sidebar on the right is getting moved to the bottom when viewing the website through IE. This does not happen with Firefox. Basically, I want it to look like Firefox and not like IE.

    I think I might be missing a line of [endif] code in my sidebar.php file.

    Here is the code from my sidebar.php file:

    <div id="sidebar-wrapper">
    
                    <div id="sidebar">
    <?php if ( !function_exists('dynamic_sidebar')
            || !dynamic_sidebar() ) : ?>                 
    
    					<?php
    
    $today = current_time('mysql', 1);
    
    if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 10")):
    
    ?>
    
    <?php endif; ?>
    
    <?php if (function_exists('wp_theme_switcher')) { ?>
    
    <?php wp_theme_switcher('dropdown'); ?>
    
    <?php } ?>
    
     <div class="sideblock">
    
    <h3>Frisco Faux Creations</h3>
    
    <ul>
    
    <li>Serving North Texas Area</li>
    
    <li>15 Years of Experience</li>
    
    <li>Recommendations Available</li>
    
    <li>Special Finishes &amp; Textures</li>
    
    <li>Cabinet Refacing</li>
    
    <li>Free Estimates</li>
    
    </ul>
    
    </div>
    			               	<?php endif; ?>
    
                    </div>
    
                </div>
    
            </div>

    Thanks in advance!

Viewing 15 replies - 1 through 15 (of 15 total)
  • It’s in header.php and the correct code should be:

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

    This assumes that you have a theme folder structure of:

    /themes/fieldofsand/fieldofsand

    which is what your current call to the ie-win.css file suggests.

    Thread Starter adizlaja

    (@adizlaja)

    Hi,

    Should I simply put that line at the top of my header.php file?

    I put the line below at the top of my header.php file and it moved the site alignment to the left and move the info box on the right further down. The error still stayed at the top of the page.

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

    I think this may have something to do with the sidebar.php file which I posted in my first post. The error started coming up as I tweaked with that file.

    Please let me know your thoughts. Thanks again!

    Should I simply put that line at the top of my header.php file?

    No – it should be in place of the faulty <!-- if lt ie line. In other words, just after the call to your theme’s stylesheet.

    Thread Starter adizlaja

    (@adizlaja)

    Thanks esmi! I made the change and the error message on the top went away. The navigation buttons on the top are slightly messed up now however. Also, the info box on the right is still on the bottom rather than being at the top right.

    You can see what I’m talking about on https://www.friscofauxcreations.com

    Please let me know if you have a solution for the button alignment and the box. Thanks!

    Now that your IE specific sheet is being called correctly, you can use it to apply adjustments for the IE browser family. Try adding the following to ie-win.css:

    #navigation ul {
    margin-top:56px;
    }

    As to the info box, it appears to be in the same place in both Firefox 3 and IE 7 – pretty much in line with the page title. Is that not correct? Or are you using an earlier version of IE?

    Thread Starter adizlaja

    (@adizlaja)

    I am using version 6.0. I don’t want to leave out those that don’t have the latest version.

    I tried adding the code from your post above but it did nothing. I also tried tweaking the existing numbers in the ie-win.css file which led to no changes. I wonder why no changes are happening?

    Here’s the rest of the code from the ie-win.css file:

    .slogan {
    margin-bottom: 5px;
    }
    
    #navigation {
    margin-top: -20px;
    }
    
    #footer {
    margin-bottom: 0px;
    }

    I really think the info box issue comes from the sidebar.php file. I posted the code from sidebar.php in my first post. Can you see if a break is missing somewhere or if I didn’t close a tag or something? I’m sorry but I’m not very good at the whole coding thing. ??

    Thanks again!

    I tried adding the code from your post above but it did nothing.

    Add a second conditional comment for IE6 along with an IE6 specific sheet.

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

    Then create an ie6.css file in the same folder as your other .css files and add the following to it:

    .post-wrapper {
    width:600px;
    }

    I really think the info box issue comes from the sidebar.php file.

    I seriously doubt it. I’ve just checked the site out in IE6 and the dropped info box is a classic example of IE6’s extremely poor CSS implementation. The extra sheet should fix it though you might have to tweak the width setting a little to get it just right.

    Thread Starter adizlaja

    (@adizlaja)

    I made the changes. Can you please see what it looks like using IE 6? I don’t have IE 6 on my home computer. By the way, where did you download IE 6?

    From what I can tell on my home PC, the buttons on the top are still messed up. Thanks again!

    Grab a copy of the IETester.

    Thread Starter adizlaja

    (@adizlaja)

    OK, I’m back at work and can see the site through IE 6.

    The site is still the same – the info box is still at the bottom right and the buttons on the top are not aligned properly when you hover over them.

    Firefox does display the site properly however. Think there is something we are still missing here esmi?

    Try dropping the width in the post-wrapper class to 500px.

    Thread Starter adizlaja

    (@adizlaja)

    I’ll try that as soon as I get home. Anything I can do to fix the navigation buttons up top?

    Also, do you have MSN or AIM so we can talk?

    Thread Starter adizlaja

    (@adizlaja)

    I’ll try that as soon as I get home. Anything I can do to fix the navigation buttons up top?

    Also, do you have MSN or AIM so we can talk?

    Thread Starter adizlaja

    (@adizlaja)

    esmi, would it be possible for me to give you my site info so you can look at it personally?

    Thanks!

    Thread Starter adizlaja

    (@adizlaja)

    Hello? Can anybody please help me with this?

    The things esmi mentioned did not work. Again, I feel like this is an issue in the sidebar.php file that I posted in the first post.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘<!–[if lt ie]> <![endif]–> Error’ is closed to new replies.