WordPress.org

Forums

The usual culprit - IE (7 posts)

  1. CognitiveCombine
    Member
    Posted 6 years ago #

    Hi all,

    I am a little stumped when it comes to the quirks of IE and css.

    If you look at my site http://www.cognitivecombine.com in FF and IE, you will notice that in IE the #mainwrap background image is showing up on the right side.

    What's the issue here? Is it the border of #mainwrap or the alignment?

    Muchos thank you in advance.

  2. John
    Member
    Posted 6 years ago #

    It might help to add: background-repeat: no-repeat; to your #mainwrap

  3. CognitiveCombine
    Member
    Posted 6 years ago #

    That would cause me to lose the drop shadow effect. #mainwrap has the background image.

  4. John
    Member
    Posted 6 years ago #

    Sorry my bad I meant: background-repeat: repeat-y;

  5. CognitiveCombine
    Member
    Posted 6 years ago #

    Thanks so much, this solved 90% of the problems.

    Now one remaining issue is that at the top of #mainwrap I get an 8px gap between the top-border image and the header.

    And on post pages I get a background image display above the credits.

    I have been looked at the code every day, but I just can't explain these two issues.

  6. John
    Member
    Posted 6 years ago #

    IE tends to behave differently when it comes to margins. Especially IE6. I personally use a separate stylesheet for IE. You only need to put the styles in your IE stylesheet that create a problem for you. To avoid other browsers picking up the IE styles, add the IE stylesheet with IE conditional comments like this:

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

    For more info about conditional comments see:
    http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx

  7. CognitiveCombine
    Member
    Posted 6 years ago #

    Thanks for the tip, I was going to leave this to a last resort. I guess there is now way around adding separate CSS tags in a separate stylesheet for IE.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags