Apparently, Internet Explorer 7 is stupid. I mean, it lets you create a form input element dynamically, and add it to a form, but the form doesn’t know it by name. And I only just found this out!
Pretty much all web developers should know by now that browser sniffing is evil. If you don’t know why, you should definitely read Richard Cornford’s excellent treatise Browser Detection (and What to Do Instead). Feature detection, where you look for the specific feature you want to use, is much safer; taken to the extreme, it can end up like the rather clever Modernizr project. But what if you really do just want to know if your code has the misfortune to be running on IE7?
Sometimes it’s just easier to write a quick hack to get the job done. This is one of those times.
SWMBO, the CSS guru in the house, quite rightly wants to use the :before and :after pseudo-elements to add some style to a website, in a way that will make it easy for the client to add content without struggling with keeping the format consistent. That’s easy enough in Firefox, Safari, Chrome, Opera, even Internet Explorer 8 and 9… but not Internet Explorer 6 or 7.