CSS Bologna 👨‍🏫

Z-Index

🏡 Home

Any positioned element will render above elements in flow layout, which means you will need to manage the layers of elements in the DOM. You manage this by using the z-index property. The z-index property is a number that determines the layer of the element.

.div1{
z-index: 2;
}
.div2 {
z-index: 3;
}
.div3 {
z-index: 1;
}

div1
div2
div3