The Blog of Ryan McNair

IE6 - Time to put the old dog down

Posted: April 8th, 2009 | Author: Ryan | Filed under: CSS | Tags: , | No Comments »

With fancier newer and fresher browsers isn’t it time you let go of IE6 and embrace better browsers.
Old IE6 is a nightmare for cross browser relations, it takes up to 20% of the market share and renders websites awfully, leaving designers with headaches.

CSS Hacks and tricks are needed to get the site to look identical to each other browser.
Why not save developers and designers precious time and resort to a newer more accessible browser like Firefox 3, Chrome, Safari or Opera.


CSS - Hacks and Tricks (IE6)

Posted: April 8th, 2009 | Author: Ryan | Filed under: CSS | Tags: , , | No Comments »

Here are a few hacks and filters that can help IE6 render your webpage.

1. Conditional comment hack/filter

<!--[if IE6]>

/*insert style declarations (these will only be seen by microsoft IE6 browser)*/

width:200px;

<![endif]-->

2. Tan hack

*html .boxModel {

width: 230px;

width: 200px;

height: 130px;

height: 100px;

}

The backslash within the height and width is not readable by IE5 using Windows, but does affect IE5 for Mac and IE6 for Windows.

The differences in the two hack filters are more noticeable, the conditional comment filter can support more style declarations than the tan hack. However with both filters they are not valid CSS. The conditional comment can be used in-line and doesn’t invalidate the majority of CSS created.