Support » Fixing WordPress » CSS style sheet for IE8?

  • Resolved qzha017


    Hi everyone I am trying to make my website compatible with Internet Explorer 8. What I have found out so far from the net:

    1.) Add the IE specific call in header.php before </head>

    <!–[if lte IE 8]>
    <link rel=”stylesheet” type=”text/css” href=”all-ie-only.css” />

    2.)Created and uploaded the file named all-ie-only.css onto my theme folder where my style.css is

    3.)…well here is the funny part, there isn’t part 3 explaining how to change css for IE?

    I assumed it would be so easy that people just leave it out, but I am stuck here because anything and everything I put in the all-ie-only.css dose nothing

    #navigation {float:right; position:absolute; right: -50px; bottom:24px; }

    nothing happens, can someone please please explain how to make my IE browser pick up the IE specific style?

Viewing 8 replies - 1 through 8 (of 8 total)
  • I suspect you probably have the following:

    <!--[if lte IE 8]>
    <link rel="stylesheet" type="text/css" href="all-ie-only.css" />
    <link rel="stylesheet" type="text/css" href="/blahblah/your-theme/style.css" />

    Your style.css will override the rules in all-ie-only.css. You’ll have to put the all-ie-only.css *after* style.css.

    Also see this link about using special hacks to target specific IE versions:

    Good luck!

    Hey blogjunkie thank you so much for sharing the hacks it worked, I didn’t bother with new style sheet as I only needed to change a few things (and it didn’t work, I have the <!–[if lte IE 8]>
    <link rel=”stylesheet” type=”text/css” href=”all-ie-only.css” />
    <![endif]–> as the last call.

    But anyways the \9 worked thank you so much again.

    Another questions is that on my PC the site is all good, but on my wife’s mac and mac notebook the #main is all the way in the navigator, if I adjust the margin-top:xxx px; the mac display will be set but then my pc view will see a huge gap between the #main and #navigator.

    Any reason for this anyway of fixing it so it shows the same on both PC and MAC?

    I dont think Validator is the issue I only have about 10 errors, and I checked even has like 15 errors, one of the biggest site here where I am has like 400 errors and still displays fine across all browsers and machines.

    Can you post a link to your site? There’s really no way to help with CSS or browser inconsistencies without seeing the actual site.

    It may be worth noting that some validation errors do not cause problems while others do, and that browser differences are very often caused by mark-up errors (not CSS), so you might check on that.

    Hi WPyogi
    I found out the problem, I have used position:relative instead of position:absolute.
    For everyone else with this sort of problem, use position:absolute and then use margin-top, left etc
    Dont use position:relative with top:xx px; left:xx px;

    Its funny how I manage to solve my problems right after posting for help but if I dont I will be stuck for days.

    Thanks you guys for responding so fast

    Its funny how I manage to solve my problems right after posting for help

    LOL – yeah, that seems to happen – no problem and glad you got it sorted.

    I have been having a bit of trouble myself.

    My page looks good in firefox, chrome, ie9:

    But when I switch over to ie8, strange things are occurring with the backgrounds:

    Is there any kind of background issue or fix with regard to ie8 that anyone knows about?

    Thank you very much in advance.

    @belleweb – this thread is already marked resolved and it’s unlikely your issue is the same. You should post on the forum for your theme – find it on the themes page and then click on the support tab for that theme.

    Thank you WPyogi. 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CSS style sheet for IE8?’ is closed to new replies.