11 ms·
The IE CSS Bug Which Cost Me A Month’s Salary
- patio11 17y agoAbout a year ago a blog post dissecting a minor-but-critical bug on my site was pretty popular here. ( http://news.ycombinator.com/item?id=383108 http://news.ycombinator.com/item?id=383108 ) I discovered another one today, which was so frustratingly infuriating (mostly at myself) that I had to write about it, if for no other reason than to keep pulling my hair out.
- ecaron 17y agoThe beauty of IE is that once you've found a bug, there's nothing you can do about it. I gave up trying to bring the bug I stumbled across - http://crashie8.com/ http://crashie8.com/ - to Microsoft's attention after I kept hearing "oh, your HTML isn't valid." grumbles about Netscape letting go of its mantle...
- thangalin 17y agohttp://browsershots.org http://browsershots.org
- tlrobinson 17y agohttp://browsershots.org/ http://browsershots.org/ FTW. Obviously won't work for dynamic apps, but it would have caught this one.
- andybak 17y agohttp://www.kronenberg.org/ies4osx/ http://www.kronenberg.org/ies4osx/
- motters 17y agoIE + CSS = DO NOT WANT
- sosuke 17y agoIn case you weren't already aware, Microsoft provides free images of XP and Vista with IE 6, 7 and 8. You have to get a new image every few months but they work great for making sure this doesn't happen. Only takes a few seconds to boot up the virtual pc and check your layout and functionality. http://www.microsoft.com/Downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&displaylang=en http://www.microsoft.com/Downloads/details.aspx?FamilyID=21e...
- billturner 17y agoBut last I tried to use them (a month or so ago) they no longer work in anything other than MS Virtual PC. VirtualBox, VMWare, etc wouldn't work. So, now you need to be on a Windows PC to use their images.
- niyazpk 17y agoI have been using IETester for some time now. It can give you all the IE versions up from 5.5 Link: http://my-debugbar.com/wiki/IETester/HomePage http://my-debugbar.com/wiki/IETester/HomePage
- jacquesm 17y agotypical.
- weaksauce 17y agoWhat about running virtual pc from my parallels xp virtual machine? Two levels of indirection might kill my performance but should be ok to just test basic sites.
- sstrudeau 17y agoI tried this with VMWare Fusion on a Mac running XP and couldn't get the MS VirtualPC images to work. Anyone have success running VPC with these test images in a VM (VirtualBox, Parallels, Fusion?) on OS X?
- 17y ago
- rimantas 17y agoTo prevent that in he future: 1) Test in all browsers you are supporting 2) Learn about <input type="img"…> BTW article linked in OP suggest you can use any format for the image, and suggests .jpg. This is very bad choice—save jpegs for larger photos, this format does not work well for icons/buttons, PNG (preferred) or GIF would be much better option.
- SamAtt 17y agoThere's really no excuse for not testing in all browsers but I can understand the impulse to "get the change out the door" too. For myself I tend to iplement a change in a separate file and leave the old page in place. Then as I test each browser I use the browser ID to redirect people to the changed page as I test their browser. Then when I'm done I replace the old page and remove the redirect. It sounds strange but I've found it's a good way to get changes out as soon as possible while not risking what happen to the author here.
- jhancock 17y agoThe excuse for not testing on all browsers is that its incredibly time consuming. It also requires you to be at your main workstation that has all those test VMs.
- thaumaturgy 17y agoI will take this opportunity to keep plugging for http://crossbrowsertesting.com/ http://crossbrowsertesting.com/ I'm not affiliated with them in any way, they've just made my one of my jobs much easier for not much money, and they hang out on HN sometimes besides.
- systemtrigger 17y agoOthers: Adobe BrowserLab and LitmusApp. BrowserLab is fast and free. LitmusApp is much slower and costs us $49/month but it has some advantages - it has a good series processing UI, it links to w3c html and css validation results, and it doesn't crop the bottom of the page.
- sachinag 17y agoIf you don't want to set up Selenium yourself, you can use http://saucelabs.com/ http://saucelabs.com/, which does it in the cloud for you. hugs (Jason Huggins) pops up here on HN from time to time, as well.
- patio11 17y agoThanks, that looks like exactly what the doctor ordered. It will still take me a while until I a) understand Selenium well enough to use it productively and b) can write a comprehensive test suite for the high-value customer-visible stuff and c) can figure out how to have the test suite not break (unnecessarily) every time I do an A/B test.
- jedc 17y agoA friend of mine has what might be a friendly/easy solution. http://go-test.it http://go-test.it does hosted, automated testing and even handles complex javascript.
- andrewf 17y agoScripted client testing isn't a panacea. A while back we had a similar IE6-only issue which thankfully lasted only a day before we noticed the metric dip. A push button was, in IE6 only, positioned behind an image with a higher z-index. The (Watir) automated test worked fine, because the button was there and a scripted event could hit it. But human users couldn't see it.
- Poiesis 17y agoThanks, Patrick, for your unceasing dedication to A/B testing for web signup interfaces. Why--if you hadn't actually bothered to track how well users that don't see buttons convert, well, let's just say I don't think anyone else would have done it. [knowingly. :)] Thanks for taking one for the team. Many dollars died to get this information.
- thaumaturgy 17y agoOuch. I sympathize with the author -- various CSS quirks have cost me an awful lot of time and money over the years. I'm currently solving this with two approaches: First, use crossbrowsertesting.com -- they are really great people, I was among their first users, they keep improving their site and service, it's easy, and for the money it's absolutely worth it. Every time I make changes to my libraries which might even possibly be handled differently by different browsers, I log in to CBT and test the browsers. (I've found the best order to be FF -> Safari -> Chrome -> IE 8 -> IE 7 -> IE 6; usually by the time I get to IE 6, everything's working OK.) Second, stop using CSS for (fancy) layout. It wasn't really intended to do it, and I don't expect CSS3 support to fix the usual problems I have with CSS2. So, one of my more recent projects is a simplified layout language parsed in JavaScript that makes certain things very easy. It's also very fast.
- jacquesm 17y agoYou could turn the lessons learned here into a service, something that you give a url and it will render it in all browsers known to man, then highlight the differences between the various renderings.
- quizbiz 17y agohttp://browsershots.org/ http://browsershots.org/ does this. Very poor execution. I would love to see a member of the HN community do better.
- fnid 17y agoI love browsershot.org Don't agree about the poor execution. I think it's great.
- quizbiz 17y agoI just don't like the design of the site and how you have to wait for an email. There is no instant gratification so there is room for improvement, albeit difficult to execute.
- fnid 17y agoWow, you're hard to please! ;) Have you looked at how they have it set up? Your link goes into a queue for the servers that are called "Factories." It is a massive distributed computing environment like SETI where people volunteer their computers to take the screen shots and upload them to the web for you to view.
- jacquesm 17y agoOne day I'll have an idea that nobody had before ;)
- pbhjpbhj 17y agobrowsercam, browsercamp, browsershots, browserlabs, litmus, browserpool, ... there are quite a few of these now.
- frankus 17y agoSomehow I read that domain name as kalamazeus. Which actually wouldn't be a bad name for a web app of some sort.
- theycallmemorty 17y agoA little off topic but if you're doing testing in IE8 you can switch it into compatibility mode to see how the page would render in IE7.
- rgrove 17y agoIE8's IE7 compatibility mode is not perfect, especially when it comes to JavaScript. If it really matters that your site work in IE7, you need to actually test it in IE7.
- _ck_ 17y agoIETester will let you effortlessly see your site in IE 5.5, 6, 7, and 8 (simultaneously and free and fast) - if you are on Windows of course http://my-debugbar.com/wiki/IETester/HomePage http://my-debugbar.com/wiki/IETester/HomePage It's the only multi-IE solution I've found (other than VMs) that keeps form elements working properly across versions.
- Nycto 17y agoI had issues loading this site... Looks like Google has a cached copy for anyone else looking for a mirror: http://74.125.155.132/search?q=cache:http://www.kalzumeus.com/2009/10/23/the-ie-css-bug-which-cost-me-a-months-salary/&hl=en&strip=1 http://74.125.155.132/search?q=cache:http://www.kalzumeus.co...
- ashleyw 17y agoThe site's down for me right now, so I don't know exactly what it's about. But since everyone's mentioning cross-platform testing, here's how I test for (basic) design differences: https://browserlab.adobe.com/ https://browserlab.adobe.com/ …and then fall back on a VMWare of XP with IETester.
- Semiapies 17y agoThere's nothing wrong with designing in Chrome or Firefox, but I think you have to have IE 7 open as well and at least give it a look every few minutes to make sure it matches what you see in your primary browser. (Then, of course, check how it looks in IE 6 and 8. I say keep IE 7 open because surveys have said it has the most users of any IE version at the moment.)
- recurser 17y ago> However, IE6/IE7 treat text-indent as moving the background image as well Great post - any chance you could also post the css that caused the problem? I use negative text indent all the time to do exactly this and haven't noticed any IE problems - it'd be handy to know what combination of styles causes this for future reference!
- patio11 17y agoSure. Here's the old HTML for your reference. http://www.bingocardcreator.com/files/old-site/registration.html http://www.bingocardcreator.com/files/old-site/registration.... The CSS links in that are good, but the relevant snippet is the following. The second definition is the one that, when added on top of the first, fixes it for IE. http://www.pastie.org/666918 http://www.pastie.org/666918
- wvenable 17y agoUsing text-indent: -1000px is a terrible hack anyway. Some hacks are necessary but when you're moving elements off the page to achieve an effect, you're definitely doing it wrong.
- thaumaturgy 17y agoI want to downvote you but I'll reply instead: I've noticed this sort of response on HN more lately, where someone is criticized for the way they did a thing, or their approach in solving a problem, but the criticism is completely unhelpful. patio11 clearly said in his blog post that CSS wasn't his bailiwick. Instead of simply saying, "You did it wrong!", you might say: Here's a link to some popular CSS image replacement techniques: http://css-tricks.com/css-image-replacement/ http://css-tricks.com/css-image-replacement/ It's also worth pointing out that, in that article, patio11's text-indent hack is cited as probably the most-commonly-used method.
- wvenable 17y agoFair enough, I was quick to respond. I didn't mean to comment directly to the author but make a general statement of the current state of the art in CSS: to achieve an effect use the craziest hacks one can find. As you said, patio probably just found that code on the web and used it.
- thismat 17y agoTo add to this: The reason the text-indent trick is used was normally for header replacement, navigation replacement, et cetera, and was a method of providing strong naming that didn't clutter markup and fed screen readers or CSS disabled browsers. Also to expand on it a little more, I use(ed) this trick a lot, and I've never had the image shifted off the page. I'd be interested to see the HTML that actually broke.
- mtts 17y agoLet's not be excessively gentle here: text-indent -1000 is a terrible hack (try input type="img" instead) and while I'm not mean enough to think the author deserved what he got, I also don't think we should feel overly sorry for him learning about how HTML works the hard way. If you've been at it for a few (and I do mean "a few") years, building sites that work in all major browsers (FF, IE 6 - 8, well, alright, Safari) turns out to be not the most difficult thing in the world.
- axod 17y agoA little while ago I had a similarly silly bug in Mibbit. The advertising is specifically setup to refresh every few minutes with new adverts relevant to the discussion. Only problem is, I had typo'd: setTimeout instead of setInterval = only one refresh! Bugs like that and patio's are a little hard to spot, since everything is still working, money is still being made, just not as well as it should be :)
- patio11 17y agoYeah. Its like filling a bucket with a hole in it -- the water level is still rising, so you don't notice that you're losing half of what you're putting in. Except in my case, the bucket was used to stop a shotgun blast and then I started filling it from a fire hydrant.
- JshWright 17y ago"(Word to the wise: trying to fix a Rails application by editing files in vi through a web console to your Slicehost VPS is not recommended.)" Maybe it's because I use Linode and not Slicehost, or Python rather than Rails, but this doesn't sounds like that scary a prospect to me... In fact, it sounds a lot like my development environment (simply s/web console/ssh session/).
- ionfish 17y agoIt's nothing to do with the server environment; a Linux install is a Linux install. Hacking your live application is generally still a bad idea regardless.
- JshWright 17y agoI was being facitious suggesting that somehow a Linux install would be substantially different from one VPS provider to the next (likewise that Python would be any easier or harder to hack on than Ruby). While I agree that playing with production code is generally a bad idea, there are certainly times it's called for (granted, 2AM may not be one of those times, if a few hours later you can be in your "normal" development environment)
- jrockway 17y agoIndeed. The emacs on my production server is the same emacs I use on my desktop. If an emergency fix needs to be made, I have the same comfortable environment as always. With a 256-color xterm, I don't really even notice that I am not using X either. I would like to be smug and say, "vim can't do this", but that's not true. If editing files on your production server sucks, it's because you didn't set things up appropriately. (Yes, I agree with the comment below that you shouldn't edit your production app. But if you are in a coffee shop at 2 am and a CSS problem is preventing half your users from using your site, you might just want to make a quick hack that fixes the problem and worry about "best practices" when you get up in the morning.)
- dstorrs 17y agoSome other options for x-browser testing: http://litmusapp.com/browser-testing http://litmusapp.com/browser-testing http://www.browsera.com/ http://www.browsera.com/ http://www.spoon.net/browsers/ http://www.spoon.net/browsers/ The last doesn't work for me (Mac using either FF or Safari) but the other two seem to. I haven't used any of these personally, and am not affiliated with them, just listing some options for others to check out.
- pbhjpbhj 17y agoIn other news he's taking about $5000 USD per month on his bingo creator from direct sales. I think I'd have been more thorough in testing. Maybe.
- bemmu 17y agoThis post inspired me to re-check my app on Safari & IE, and discovered it no longer worked on either. Reason: if you say "thingy.attribute === undefined", and thingy itself happens to be undefined, then it works on Firefox only. Ooopsie.
- philfreo 17y agotry "typeof thingy.attribute === 'undefined'"
- benofsky 17y agoMore like: "The lack of testing which cost me a month's salary".
- bcl 17y agoI use the IE Collection for this - http://finalbuilds.edskes.net/iecollection.htm http://finalbuilds.edskes.net/iecollection.htm Every possible build of IE that you might want to test against. It is too bad he got hit by this bug, but he and/or his designer should be looking at the site with the same tools as his customers. Thanks to non-standard standards you really can't trust that anything you make is cross-browser until you confirm it.