Devlog - 2025-10-08
π What I Did
- House Painting.
π§ What I Learned
z-index
- Control the vertical stacking order of positioned elements that overlap on the page.
- Works on elements that are positioned.
- Position - static, relative, absolute or fixed.
- Default value is
auto.
.box1 {
position: absolute;
z-index: 1;
background: lightcoral;
top: 20px;
left: 20px;
width: 100px;
height: 100px;
}
.box2 {
position: absolute;
z-index: 3;
background: gold;
top: 40px;
left: 40px;
width: 100px;
height: 100px;
}
π₯ Whatβs Next
- More Css
| β Previous | Next β |