Answer the question
In order to leave comments, you need to log in
How to make z-index work?
https://jsfiddle.net/nq6Lekav/
Need .block to be under .wrap. However, .block must remain nested.
HTML
<div class="wrap">
<div class="block"></div>
</div>
.wrap {
position: relative;
z-index: 1;
}
.block {
position: fixed;
z-index: 0;
}
Answer the question
In order to leave comments, you need to log in
You cannot put a nested element through the z-index under the parent. IT IS FORBIDDEN! Make it more correct!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question