How to leave the image in front of the text?

Asked

Viewed 632 times

1

The image below shows that when placing the mouse over the image, it gets larger with a SCALE via CSS (transform: scale(3.05)). But the content of the site below is on the image, would anyone know which CSS code to use to put the image in the foreground, above any content? That is, the image should be above the texts that come below it.

  • 1

    Buddy, use the css z-index, find out which image z-index is below and apply a higher or lower value to the div you want to leave ahead.

1 answer

2

Place this element with a property:

z-index: 9999;

  • 2

    It is worth remembering that the z-index only works for positioned elements

  • This one is definitely positioned.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.