Supporting multiple browsers

From Joomla! Documentation

Documentation all together tranparent small.png
Under Construction

This article or section is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well. If this article or section has not been edited in several days, please remove this template.
This article was last edited by Chris Davenport (talk| contribs) 10 years ago. (Purge)

With the gradual evolution of both CSS as a standard and various browser implementations, it is inevitable that stylesheets need to be written to cope with various browser incompatibilities. This is particularly true for Microsoft Internet Explorer, but issues can also appear for other browsers too. The most frequently used method of handling cross-browser issues is to include an extra browser-specific CSS file in addition to the main CSS file used by the website. This might be specific to a particular class of browsers, for example Internet Explorer or Safari, or it might even be specific to a specific version of a particular browser, for example Internet Explorer version 6 and version 7 may require different stylesheets.

The first step in handling browser incompatibilities is browser-detection. How can the type and perhaps the version of the visitor's browser be reliably determined?