0

CSS Z-index help '

Z-index help - CSS I'm trying to experiment. The instruction/explanation is in the code. I'm trying to use z-index to display a block on top, but not working. https://code.sololearn.com/WI44BX288qHk/?ref=app If question = not understood, let me know.

4th Jun 2019, 12:58 AM
Ginfio
Ginfio - avatar
1 Antwort
+ 3
Try this .blue{background-color: blue; width: 200px; height:50px; position:relative ; z-index:44; } .red{background-color: red; width:150px; height:50px; margin-left: 25px; margin-top: -75px; z-index:1; } .red:before{background-color: green; content: "green"; width:100px; height:100px; position: absolute; z-index:99; }
4th Jun 2019, 4:03 PM
Trinity