In doing this,
you??™re exploiting the feature of CSS error handling (p. 44) that specifies that user
agents must ignore statements and declarations they don??™t understand.
Using a child selector (p. 76) is another common example of this kind of filtering
technique. The child selector is 100% valid CSS??”it??™s only a filter in the sense that
it??™s only supported by modern web browsers. Internet Explorer versions prior to 7
have not implemented this feature, so it??™s a useful way to hide CSS rules from
Internet Explorer 6 and earlier versions. The child selector is commonly used like
this:
#test{
position: absolute;
}
html>body #test{
position: fixed;
}
The filter above is designed to address the fact that Internet Explorer 6 and earlier
versions don??™t support the value of fixed for the position property. These browsers
will only set the position of the #test element to absolute, and will ignore the
second rule. Meanwhile, virtually all other modern browsers will set #test??™s
position to fixed, because they apply the second rule and overwrite the property.
Pages:
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584