2007/04/25

[HTML] Conditional Comments

When dealing with HTML and CSS, the most difficult part is to get everything work in different browsers.

Some hack tips:
In CSS, the way I use to code for different browsers (usually IE and FF) is '!important'.
However, it seems that IE 7 understands this magic command while IE 6 doesn't. It makes more difficult to recognize IE 7 and FF.

Here is the solution: Conditional Comments
simple way to check IE version
<!--[if IE 6]>

Using Internet Explorer 6.

<![endif]-->
or check the condition: [if !IE] => for FF