5 hands-on exercises and 5 find-the-bug challenges for the CSS Z-index lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Give #box a z-index of 10 with relative positioning.
Give #box a z-index of -1.
Put #text above #box.
Use opacity to create a context without positioning.
Absolutely position #box and raise it.
z-index is ignored on a static element.
The property is z-index.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspacez-index takes a plain integer.
#text should sit above #box.
Sending an element behind needs a negative index.