Negative :before z-index on absolutely positioned element not working in IE8
css, css-position, internet-explorer-8, pseudo-element, z-index
Solution
I've found a working solution:
- Add a relatively positioned div inside the container
- Set its `z-index: -1`
- Add the `:before` element to the div not to the container.
Here's a fiddle http://jsfiddle.net/WaTnn/3/
If someone has a better solution, I'd be happy to see it.
Problem
I've searched about this problem and know that IE8 has quirks rendering elements with pseudo tags but couldn't find solution for my problem. I'm trying to position absolutely an element and add to it a pseudo :before element which must be beneath its parent. Using: ``` .container:before { z-index: -1; } ``` do the trick with Firefox and Chrome but not on IE; Here's the fiddle http://jsfiddle.net/WaTnn/ How can I position the yellow element beneath the red in IE8 and still have it's parent be absolutely positioned?