Search code examples
cssbrowsercross-browserstylesheetcompatibility

is it ok to use different css files for different browsers and load it accordingly


I am getting rid of browser compatibilty issues.

so i come up with idea to load the only css according to browser.

So say if user uses IE then only styleIE.css get loaded if firefox styleFF get loaded and so on.

my question is it correct method if not what care should taken to avoid this compatibilty issues. because when i solve issues for IE then it opens the new issue in a my stable version of FF


Solution

  • That is done frequently although you probably want to use a general CSS file with the shared styles and combine it with the browser dependent CSS file.

    But in fact most CSS problems with different browsers can be solved without this trick and by just using the correct markup and styles...