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:

    “On a subconscious level your child experiences separation from you as a “punishment.” And if he is to be “rewarded” with your return, he must be very good.... Eager for you to come back, your finicky son would probably eat liver if your baby-sitter served it, and he wouldn’t dream of resisting her at bathtime.”
    —Cathy Rindner Tempelsman (20th century)

    “I was gonna call it “I Love You, Samantha” but some old hack got there before me.”
    —Blake Edwards (b. 1922)