Posts tagged “ie7”

Feature sniffing Internet Explorer

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?

Internet Explorer CSS hacks with JavaScript

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.