Difference between revisions of "Conditional CSS"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) |
Karl Jones (Talk | contribs) (→Internet Explorer conditional CSS) |
||
Line 13: | Line 13: | ||
<head> | <head> | ||
<link rel="stylesheet" type="text/css" href="sitename.css"> | <link rel="stylesheet" type="text/css" href="sitename.css"> | ||
− | </head | + | </head> |
<![endif]--></nowiki> | <![endif]--></nowiki> | ||
Revision as of 11:44, 10 May 2016
In Cascading Style Sheets, conditional CSS refers to CSS rules which are conditional: the rules apply under some conditions, but not others.
Internet Explorer conditional CSS
Internet Explorer has its own conditional CSS, which can apply to all versions of Internet Explorer, or certain specified versions.
All other browsers will ignore these conditional rules.
In the example below, if lt IE 9
indicates that Internet Explorer which is less than version nine (lt IE 9) should use the external style sheets:
<!--[if lt IE 9]> <head> <link rel="stylesheet" type="text/css" href="sitename.css"> </head> <![endif]-->
The above example is from a typical Bootstrap framework template.