CSS Filter - Body:empty Hack

Body:empty Hack

The :empty pseudo-class, introduced in CSS3, is supposed to select only elements which do not contain any content. However, Gecko 1.8.1 and below (used in Firefox 2.0.x and below) incorrectly selects body:empty even when the body element contains content (which it usually should). This can be taken advantage of to feed exclusive CSS rules to Firefox 2.0.x and below, along with other browsers using the same rendering engine.

/* Make p elements disappear in Firefox 2.0.x and below */ body:empty p { display: none; }

This hack uses valid CSS.

Read more about this topic:  CSS Filter

Famous quotes containing the word hack:

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