Browser Detection and Cross Browser Support
categorie→
[
Browsers : ] Modifica33441290 |
TOP
25 luglio permaLink 33441290 → Intervieni l'articolo Browser Detection and Cross Browser Support · 0 ·
Browser Detection and Cross Browser Support
Using Netscape Navigator 4's CSS limitations
It is possible to use Netscape Navigator 4's limitations for CSS support to automatically exclude certain CSS rules from ever being seen by Navigator 4.
For example, Navigator 4 does not understand the @import directive in CSS and will not load any external CSS Style sheets specified via @import. This technique can be used to provide basic common CSS rules for all browsers (including Navigator 4) while providing more advanced rules in a external CSS file for more modern CSS compliant browsers.
<style type="text/css">
/* Navigator 4 CSS rules */
</style>>
<style type="text/css">
/* Advanced CSS rules ignored by Navigator 4 */
@import "advanced.css";
</style>>
A similar technique is available for hiding CSS rules from Navigator 4 using the fact that Navigator 4 will ignore CSS rules after an occurence of '/*/*/' in a stylesheet.
<style type="text/css">
/* Navigator 4 CSS rules */
/* Advanced CSS rules ignored by Navigator 4 */
</style>>
DevEdge uses this technique to hide advanced CSS from Navigator 4.