Dynamic CSS

Cross-browser related styles get managed by an browser detection, that can be used to create dynamic ids and classes. It's recommended to setup your dynamic class within the body tag.

<body class="<?php echo _user_browser; ?>">

This code generates browser and version related classes according to the user agent.

<body class="firefox3"> • <body class="msie7"> • <body class="opera9">

Define CSS for Mozilla Firefox 3.

  • .firefox3 input.button {
  • padding-top: 4px !important;
  • padding-bottom: 4px !important;
  • }

Define CSS for Internet Explorer 6 and 7.

  • .msie6 input.button, .msie7 input.button {
  • padding-top: 4px !important;
  • padding-bottom: 3px !important;
  • padding-left: 0px !important;
  • padding-right: 0px !important;
  • }

Browser selectors like chrome, firefox, konqueror, msie, netscape, opera and safari can only be used in combination with their major version number.

Navigation

Promotion