CSS Filter - Child Selector Hack

Child Selector Hack

Internet Explorer 6 and earlier do not support the "child selector" (>), allowing rules to be specified for all other browsers. For example, this rule will turn paragraph text blue in Firefox, but not in IE before version 7.

html > body p { color: blue; }

Although IE7 added support for the child selector, a variation of the hack has been discovered which allows Internet Explorer 7 to be excluded as well. When an empty comment occurs immediately after the child selector, IE7 will drop the rule that follows, as will earlier versions of IE.

html >/**/ body p { color: blue; }

Read more about this topic:  CSS Filter

Famous quotes containing the words child and/or hack:

    In England, I was quite struck to see how forward the girls are made—a child of 10 years old, will chat and keep you company, while her parents are busy or out etc.—with the ease of a woman of 26. But then, how does this education go on?—Not at all: it absolutely stops short.
    Frances Burney (1752–1840)

    Painting consumes labour not disproportionate to its effect; but a fellow will hack half a year at a block of marble to make something in stone that hardly resembles a man. The value of statuary is owing to its difficulty. You would not value the finest head cut upon a carrot.
    Samuel Johnson (1709–1784)