Pls I really need help

Pls can someone explain how z-index works.

For example, with this setting for z-index:

<style>
img {
  position: absolute;
  left: 0px;
  top: 0px;
  z-index: -1;
}
</style>

you will get:
image

But if you change the value of the z-index to 1 you get the following:
image

As you can see the image is now in front of the text or on top of the background layer.

This should help explain it?

Thank u very much. :grin:

1 Like

Yeah it was very helpful. :grin:

Pls how do I signup for this w3school.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.