As many users around the globe are still using Internet Explorer (IE), as a developer we need to deal with the bugs of IE. Certainly IE 6 has been the nightmare of many designers, IE 7 looks better but still had some problems, IE 8 was better still, and IE 9 is certainly much better, but to the extent that you care about supporting older versions of IE. You may face design problems that you need to solve so this article is intended to give some advice. We typically use IE conditional comments to fix the IE issues.
Fixing CSS Bugs
- While creating a design or template for a website you should design the same in Firefox or in Chrome. Once the design is completed look for the problems in different versions of IE because IE is the least standards compliant browser. The issues can be fixed by using IE Specific CSS files that do not affect other browsers.
The IE conditional comments can be used in the head section of html page to fix the issues in IE.
This example only affects IE 6
<!--[if lt IE 7]>
<link rel="stylesheet" href="style-ie6.css" type="text/css"/>
This example only affects IE 7
&><!--[if IE 7]>
<link rel="stylesheet" href="/style-ie7.css" type="text/css" />
This example affects any version of IE
css codes can be written here
The following error appears in the page because of following reasons
If the <script> block is not written properly.
<body onload="init();"If the init function is not written in any part of the page then it will give an error.