Does iframe prevent z-index from working?

I am trying to use the css z-index attribute so that one element is always ahead of the other, but it does not work. The z-index of one element is clearly larger than the other, but it is still located behind the other element. Maybe because one of the elements (the one that appears in front) is an iframe? Does anyone have any other advice?

+4
source share
1 answer

Remember that z-index only considers absolute elements. Both elements must have a position: absolute. Additional Information in CSS 2.1 Specification

+5
source

Source: https://habr.com/ru/post/1381164/


All Articles