Death to IE6 #2

IE6 must die.

IE6 must die.

In this post I already told you how much I hate IE6, and I’m not the only one, so I decided to stop squirming around it, and simply stop designing around it, unless a client pays extra.

This might be useful for some of you out there who also want to avoid the agony of IE6. I recently started using this code, and so far it works pretty good.

In the <head> of your HTML:

<!–[if IE 6]>
<style type=”text/css”>
#ie6 {
display: block;
}
</style>

In the <body>, before anything else:

<div id=”ie6″>It seems you’re using an old browser. In order to view this site correctly, we advise you to <a href=”http://www.microsoft.com/windows/products/winfamily/ie/default.mspx”>upgrade your browser</a>, or try the free <a href=”http://www.mozilla.com/firefox”>Mozilla Firefox</a>.
</div> <!– end #ie6 –>

And finally in your .CSS file:

#ie6 {
font: normal 12px Arial, Helvetica, sans-serif;
color: #333333;
background: #FFFF66;
display: none;
}

This way a yellow bar telling people to upgrade their browser shows up when somebody is using IE6. In any other browser it will be hidden.

You can use/edit/redistribute this piece if you like. Any comments are also welcome.

Tags: , , ,

14 Responses to “Death to IE6 #2”

  1. Ramiro Ruiz Says:

    Nice, like http://www.stuffandnonsense.co.uk/ site, and also the whole design change

  2. Mark Says:

    Thanks for the reply, but in your case, you’re still designing a whole site for IE6. With my code, all you have to do is copy and paste and let the visitor do the rest..

    I don’t think it’s our responsibility anymore to design around IE6.

    Look at flash plugins. When you’re using an old flash-version a lot of sites simply don’t work and ask you to upgrade. Why not do that with a browser?

  3. Japh Says:

    Hi Mark, great idea! I took your idea and expanded it a little (and made a correction or two ;) )

    Works a treat! If you want the adjusted code, just let me know.

  4. Dee Says:

    Great idea, designing for different browsers is such a headache:0(

  5. Curvball Says:

    Brilliant idea! Will be implementing this on future projects (I don’t support IE6) – thanks for sharing Mark.

  6. Mike Smith Says:

    thanks for the tip and thanks for letting me know through twitter about it. I think after the first of the year, I’m killing off IE6 support.

    Mike Smith’s last blog post: How you can FAIL at email marketing in three easy steps

  7. weberica Says:

    I’ve put your code on my site , but I am not shure if it works. I have “multiple ie” on my pc and when I check my site with ie6 I don’t see this warning.

  8. Mark Says:

    @weberica: Check out http://www.geraldgareau.com . That’s a site where I used it live. Examine that code..

  9. Boyan Yurukov Says:

    I am so doing this, but with just Firefox and on all IEs

    Boyan Yurukov’s last blog post: Google SearchWiki – гласуване към резултатите от търсене

  10. JZ Says:

    great idea…thumbs up for sure

  11. sergiofores Says:

    IE6 must desapear!

  12. Randy Peterman Says:

    This reminds me of StopIE6.com. Stop the insanity.

    Randy Peterman’s last blog post: IE7 ClearType Gripe

  13. weberica Says:

    no, it doesn’t work if you have multiple ie instaled.
    I use another script on my site and it’s the same thing, it works if you check it with ie-tester, or if you have ie6 as only ie browser.

    http://www.weberica.net

    http://www.kroativ.net/2008/12/15/kako-se-boriti-protiv-ie6/

  14. Mark Says:

    @weberica Odd, it should work. I also tested it in IEtester because I don’t have IE6. Can you show me the code somewhere?

Leave a Reply

CommentLuv Enabled

Additional comments powered by BackType