Reputation: 64276
I have a div with default position
argument. Now I need to put under it another div:
#Dark
{
width: 250px;
height: 100px;
background-color: #1a1a1a;
margin: 0 auto;
/*position: absolute;*/
z-index: 999;
}
#Blue
{
background-color: #046a81;
height: 90px;
width: 30px;
position: absolute;
z-index: 10;
}
How to put blue one layer down (it should be rendered before dark div) if I can't make Dark
position as absolute?
Upvotes: 0
Views: 5113
Reputation: 324650
Make the #Dark
have position:relative
. It still behaves as if it were in the flow, but now you can adjust the z-index
.
Upvotes: 2