IE7 Just Won’t Die

A very long time ago, as a CSS enthusiast, I wrote an article called ‘IE6 Just Won’t Die’ and it was significantly more angry than this one. As a CSS developer, IE6 just made me a little crazy. IE7 was a step up, but there are some common pitfalls for the modern CSS programmer who still needs to support IE7. Here are the top ones I have seen in the last month.

  1. Negative Margins

    For the love of all that is good and right, stop using negative margins. Yes they are very handy when positioning has to be just right, but they should make you feel a little queasy. There is always another way, and you should take it! They create confusing code, and IE7 will ignore negative margins on any element that is contained by another elmement which hasLayout. This is very hard to avoid, as it is triggered by specifying absolute position, floats, and dimensions, among other triggers.

  2. Pseudo-Classes :hover, :active, :before :after :last-child, :nth-child

    :hover and :active only work when applied to anchor tags, and the others are simply not supported at all. There’s really no good way to simulate them without JavaScript. If you expect your site to rely heavily on pseudoclasses, I recommend a JavaScript solution like Selectivizr or the PIE shiv. Both have their limitations, and I’m finding more and more that in order to be an expert CSS developer I also have to be an expert JavaScript developer.

  3. Pseudo-Classes :checked and :disabled

    In addition to the suggestions above regarding JavaScript solutions, you can also try attribute selectors for these two. This is the item that I will get most upset about, and it’s not actually due to it’s problems with IE7. These pseudoclasses are also not supported in IE8 (same with last-child and nth-child) and yet I see them cropping up in amateurs’ code frequently. There are always exceptions where it might be ok, but I keep seeing them on e-commerce sites and that just disturbs me. Are you just not checking that you can make a sale in IE8? Really? IE8 is the browser that shipped with Windows XP SP2, which is still one of the most popular OS’s today. Many people work in locked-down environments and cannot upgrade to IE9/10. If the site’s purpose is to sell anything, then you need to support IE8, and it should not even occur to you to use these pseudoclasses.

  4. Zoom Hacks

    There are suggestions all over the web to use “zoom:1;” as a way to trigger hasLayout when you need the element to be in a state of hasLayout. They may come along with all sorts of extra syntax to make it specific to certain versions of IE or other such conditionals, but overall it’s best to avoid. The zoom property is non-standard (the CSS3 standard allows for its use only within an @viewport rule) and causes weird behavior between browsers. The real killer, though, is that a lot of JavaScript plugins (including jQueryUI) use the zoom hack to properly position widgets, and you do not want your CSS to be fighting with your scripts. If you absolutely must use an arbitrary rule to trigger hasLayout, try width:100% or the min-height property (as suggested here). And if you can, comment the reason!

I’ve also got some issues with JavaScript developers who can’t seem to get IE7 under control, but mostly they just need more experience with a good framework like jQuery or Prototype. As a freelancer I thank anyone who takes this to heart. Half of my work is cleaning up your mess ;)

Posted in Career
0 comments on “IE7 Just Won’t Die
45 Pings/Trackbacks for "IE7 Just Won’t Die"
  1. […] consistent “zeroed-out” set of styles on which to build. This goes hand-in-hand with my last post about IE7, which definitely has some differences in rendering lists (among other elements). This can destroy […]

  2. … [Trackback]…

    […] Find More Informations here: abbysdoor.com/ie7-just-wont-die/ […]…

  3. … [Trackback]…

    […] Find More Informations here: abbysdoor.com/ie7-just-wont-die/ […]…

  4. spam repairs says:

    … [Trackback]…

    […] Informations on that Topic: abbysdoor.com/ie7-just-wont-die/ […]…

  5. … [Trackback]…

    […] Read More: abbysdoor.com/ie7-just-wont-die/ […]…

  6. … [Trackback]…

    […] Informations on that Topic: abbysdoor.com/ie7-just-wont-die/ […]…

  7. realestate says:

    … [Trackback]…

    […] Read More here: abbysdoor.com/ie7-just-wont-die/ […]…

  8. map moroon 5 says:

    … [Trackback]…

    […] Read More: abbysdoor.com/ie7-just-wont-die/ […]…

  9. some good habits you can adopt to…

    ensure that you are productive and writing frequently? in today’s article we’re going to take a look at a couple.the first habit that you should adopt is regularity. don’t wait for the muse to strike, but rather write at a set…

  10. … [Trackback]…

    […] Read More: abbysdoor.com/ie7-just-wont-die/ […]…

  11. … [Trackback]…

    […] There you will find 33731 more Infos: abbysdoor.com/ie7-just-wont-die/ […]…

  12. focus of the article, and is a…

    simple, yet effective tool to enhance your article writing skills.3. prefer words and phrases that feel natural to you – embrace your uniqueness. once you start imitating someone else’s style and use the techniques that don’t come naturally to you, t…

  13. more says:

    marketers to have at least one of…

    their projects printed and available for sale to the public.a printed book is also your best business cards. imagine showing up at a conference with no book and trying to advertise the fact that you sell an ebook! no one will…

  14. people to tell their friends and family…

    about your site or articles. subscribe to comments reloaded (by camu) — such a small feature yet it can be powerful. it leaves a little box for commentators to tick if they wish to follow comments by other commentators. what does…

  15. and offer you a lot of opportunities…

    at school and at work. from time to time, you need to develop your writing skills for you to land a job after school. it is of great importance that you know how to write well.learn to open your mind to…

  16. Konzert says:

    … [Trackback]…

    […] Read More here: abbysdoor.com/ie7-just-wont-die/ […]…

  17. this is really a nice post….

    I saw this really great post today….

  18. this is really a nice post….

    I saw this really good post today….

  19. this is really a nice post….

    I saw this really great post today….

  20. this is really a nice post….

    I saw this really great post today….

  21. them with the link and present it…

    to them. having said that, for the new blog which has never been viewed, there are plenty of methods for getting it out there and recognized. you simply need to learn how. the first thing that you should do is to…

  22. … [Trackback]…

    […] Read More Infos here: abbysdoor.com/ie7-just-wont-die/ […]…

  23. those lines. just get out there and…

    go for it! having a business is about creating products and services, generating sales, striving to get customers at all times, and making your customers happy with what you are offering. having a business means the need for a good marketing…

  24. weekly feature. let’s say you have a…

    tip of the week. so why not expand that tip of the week into and entire article.and for a third time you are repurposing your content in several ways to expand your reach online. if you want to have regular visitors…

  25. this is really a nice post….

    I saw this really good post today….

  26. maui condos says:

    is this important? the reason is that…

    if you have people in india writing american style articles, they will end up sounding and reading horribly. this is a bug turn off to readers and by having a well reading article, you will better positioned to make more money…

  27. m88 says:

    swipe file is not always enough, sometimes…

    you have to find some inspiration from other sources, and you can do it real quickly using the best blogs method.the best blogs method started out for me as a form of niche research which is more usually used as a…

  28. think of a subject or area you…

    are good at and write about it, maybe you could blog about blogging, or talk about your dreams and what you think they mean.2. spell check and proof- read your work after you have finished. a blog with loads of spelling…

  29. mr bean says:

    this is really a nice post….

    I saw this really great post today….

  30. see here now says:

    the nature of the blog, business owners…

    may even choose to include their own personal opinions about different subjects or stray off-topic from time to time in order to seem more personable. no one understands the process of writing a successful blog better than blog post writers for…

  31. relationships through your writing. you have to…

    be able adapt your writing to fit within the parameters of the network you are using. learn to do that, and your online writing skills may soon be in high demand. ever wonder why two different people can tell the same…

  32. to hire a web designer. blogging may…

    offer a cheaper way to get the business name out on the internet. furthermore, businesses can update the blog themselves. it is quicker than contacting the web designer and discuss what the changes are.nowadays, internet has become more around the worl…

  33. this is really a nice post….

    I saw this really great post today….

  34. this is really a nice post….

    I saw this really good post today….

  35. this is really a nice post….

    I saw this really great post today….

  36. this is really a nice post….

    I saw this really great post today….

  37. their secrets then they might not be…

    able to make so much money. some people that make an income from blogging may write an ebook and sell itas mentioned before, being a millionaire blogger comes from a large number of blogs and at some point the blogger would…

  38. will probably earn $6-$8 for every blog…

    article or more depending on the nature of the blog.2. article writer. get paid to write articles for article promotion purposes.article marketing continues to be a great way to generate backlinks and traffic if the articles are unique. once again sear…

  39. out and you check that it loads…

    quickly and has all the necessary gadgets and links for good information, you can start adding it to social networking sites, like facebook, twitter, linkedin, etc.now you should have a better idea on how to begin a good blog, have fun,…

  40. add just that extra gloss required in…

    presenting an idea. you can combine infographics or information graphics in your blog post and enhance the readability of your blogs.when you create content that others read, comprehend and assimilate thoughts about, it becomes necessary to present the…

  41. New Movies says:

    it won’t cost advertisers a fortune, and…

    thus big corporate and small start-ups are on equal footing here.from the blogger’s point of view, it’s a clear advantage for them. people generally like to submit opinions about what they did all day, the new gadget they bought lately or…

  42. Popcorntime says:

    frustration for your customers if they have…

    to constantly re-learn how to navigate your site, a blog allows you to provide a steady stream of content, keeping google interested and your pagerank up.2. a business blog is a great way to engage your customers on a new level.customers…

  43. … [Trackback]…

    […] Read More here: abbysdoor.com/ie7-just-wont-die/ […]…

  44. this is really a nice post.

    I saw this really good post today.

Leave a Reply