1 2 3 4 5 6 7
/* Source: http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/html/tests/css3-modsel-d1b.html */ #test1 { background: red; display: block; padding: 1em; margin: 1em; } #test1:empty { background: lime; } #test2 { background: lime; display: block; padding: 1em; margin: 1em; } #test2:empty { background: red; }