Posts Tagged ‘hacks’


CSS Hacks – Using Conditional Comments

Monday, January 12th, 2009

In regards to coding standards compliant websites with CSS, dealing with Internet Explorer can be a nightmare.  Of course, all browsers have CSS bugs, but IE is known to have significantly more due to their own implementation of browser standards.

This is a list of some well-known issues found in Internet Explorer starting with version 5.  Based on browser popularity and saturation reports, many web designers have targeted which versions of Internet Explorer they will support and which they will drop.

Neal Advertising’s general policy is that we do NOT support IE6 any longer and provide simple redirection for IE6 users to gain access to more recent and advanced browsers.  We know this will limit some users and aggravate users on a network that doesn’t allow them to upgrade their version of IE.  However, with any new sites we create and develop, we always make a point to analyze the demographic of that site and decide whether it’s a good idea or not to drop IE6.

No matter how well you write HTML and CSS, it is inevitable that you will need to specify certain adjustments for Internet Explorer.  With this fact in mind, there are several different ways to target a specific version of Internet Explorer for optimal viewing results.

Using Conditional Comments

Using conditional comments can be valuable because they are easy to define in the head of your document and keep all of your specific CSS fixes in one separate, contained location. It is important to keep in mind that they will only work in Internet Explorer on Windows.  (Since Apple dropped IE at version 5.5 and added the more compliant-friendly Safari, this isn’t really a huge problem.)

(more…)