css - Issues with negative z-index in IE8 -
i using 2 pseudo elements create banner effect on div, so:
div { position: relative; width: 200px; background-color: #999; } div:before, div:after { content: ""; width: 10px; height: 0; display: block; position: absolute; z-index: -1; top: 10px; border-top: 10px solid #666; border-bottom: 10px solid #666; } div:before { right: -20px; border-right: 10px solid transparent; border-left: 10px solid #333; } div:after { left: -20px; border-left: 10px solid transparent; border-right: 10px solid #333; }
it works fine in ff, chrome, safari & ie9, no luck ie8. 2 elements z-index of -1 show above parent. there way work?
you should try setting z-index
of 1 div
.
Comments
Post a Comment