'What are the zIndex stacking values of the <html> and <body> elements?
From where does the stacking count start in HTML? for the <html> and <body> tags.
I have seen many people writing zIndex: -99 to bring the item to the back.
But if z-index: -99 is possible, then what is the static z-index of the <html> and <body> elements?
Since the only reason we can't set the z-index on the <html> and <body> elements is that they're static.
Solution 1:[1]
You aren't exactly using the terminology that the spec uses however I guess you could say they have z-index: 0 because if you set any child to z-index: 0 it has the default stacking order, if you put a positive z-index then it will go above, and if you put a negative then it will be below.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Zachiah |
