Negative Z-Index hides behind parent element

by J. Albert Bowden

HTML

<div id="foo">
<div id="bar"></div>
</div>

CSS

#foo { background-color:green; width:100px; height:100px; position:relative; }

#bar { position:absolute; width:25px; height:25px; background-color:red; z-index:-1; }