Forum : Browser compatibility
Brief description  about Online courses   join in Online courses
View Sandhya  Musalkol 's Profile

Browser compatibility

Hi,

I am checking my webpage on Google Chrome.
When I check the same in Internet Explorer, its not formatted properly. How do I make sure that the webpage works fine on all browsers?

Thanks.
Regards,
Sandhya
Asked by Sandhya Musalkol | Apr 17, 2010 |  Reply now
Replies (2)
View sandhya musalkol 's Profile
thank you.
Apr 23, 2010
View teacher siliconindia 's Profile
<link href="homeoutside/formozilla.css" rel="stylesheet" type="text/css" />
<link href="homeoutside/forie.css" rel="stylesheet" type="text/css" />
<link href="homeoutside/forie7new.css" rel="stylesheet" type="text/css" />


<!--[if IE 6]>
<link href="homeoutside/forie.css" rel="stylesheet" type="text/css" />
<![endif]-->

<!--[if IE 7]>
<link href="homeoutside/forie7.css" rel="stylesheet" type="text/css" />
<![endif]-->


We use the above code to overcome the browser compatibility issue.

How it works is. We have 3 different style sheets for IE6, IE7 and Mozilla.

First style sheet "formozilla.css" will work as the master style sheet. If you need any changes to be made in the master css file to adjust IE6 or IE7 just add the same id in the css file for IE6 and make the style change there.

So when the browser reads if that browser is IE6 it will compare both the style sheet, master style sheet and the IE6 style sheet. So if the browser find any change in the CSS file for IE6 it will take that particular style.

The beauty is Mozilla's style sheet will work for all other browsers other than IE. But IE6 style sheet wont work for IE 7 also. Hats off to microsoft :-)


Regards
Apr 18, 2010