I have blogged about this earlier on another blog but I'll do it again so that we have it here on Wohill.
When creating web sites you almost always have to struggle with browser specific issues where Internet explorer (also different versions) and other browsers display the code a bit differently.
Using css you should as far as possible try to make the site look the same for the different browsers. But sometimes that might not be possible and in these cases you can use HTML conditional statements.
The syntax that exists for the conditional statements are actually only for Internet Explorer. You can decide on which Internet Explorer version that is used by the user and display different code. But there is a way to also decide if the browser is not Internet Explorer and act upon that using these statements.
Here is a small example:
The HTML will run if the browser is Internet explorer:
<!--[If IE]> HTML <![endif]-->
|
The HTML will run if the browser is NOT Internet explorer:
<!--[if !IE]>--> HTML <!--<![endif]--> |
See this documentation on MSDN for a complete .