This is very frustrating....
http://jsfiddle.net/RRnm8/
<div id="target">
<p>Text to appear in front</p>
</div>
#target {
position: relative;
background: red;
width: 200px;
height: 200px;
padding: 45px;
}
#target:before {
content: "content from before, should be behind #target";
position: absolute;
top: 10%;
left: 10%;
width: 100%;
height: 100%;
background: cyan;
z-index: -1;
}
works well on every browser, except for IE8...
it should be displayed like this:
But in IE8 you get this :'(
So the question would be how to get this to work properly in IE8?
Please provide the answer as a real working example at jsfiddle...
This user has the exact same problem. He got no answer but this which clearly doesn't work, hence my kind request for a working example demonstrating it on jsfiddle
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…