Forum : My code is not supporting all browsers
Brief description  about Online courses   join in Online courses
View neeraj  khatri 's Profile

My code is not supporting all browsers

hello sir..
i had written code with in google chrome but now EPIC is not showing same results please help me
Asked by neeraj khatri | Aug 19, 2010 |  Reply now
Replies (2)
View neeraj khatri 's Profile
sir i had tried the above procedure but i was not able to perform.
kindly mail me a simple working pages working on these.so that i can study them and understand.I am using IE 8 and mozilla.
Sep 26, 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 :-)
Aug 19, 2010