In Message: <20200810065...@james.kirk.invalid>
James Kirk <
noneya....@gmail.com> wrote:
> In Message: <
mcudnQX2-6kQQK3C...@westnet.com.au>
> Andrew Poulos <
ap_...@hotmail.com> wrote:
>> I have a DIV overlapping a CANVAS element.
>> In the HTML, though the DIV appears after the CANVAS, the DIV
>> appears under the CANVAS.
>> If I set the DIV's z-index anywhere from 1 to 10000 and the CANVAS
>> to 0 the CANVAS stays on top.
Suspect that the div position is static.
>> If I don't set the DIV's z-index but set the CANVAS to -1 the DIV
>> is now on top.
>> Is there some trick to getting CANVAS to honour a z-index of 0?
>> I'd rather not set it to -1 because it'll affect other elements ie
>> there are elements the CANVAS needs to be over.
> Can you provide an example that can reproduce this behavior?
Disregard that request unless changing the position does not resolve
the issue.
https://developer.mozilla.org/en-US/docs/Web/CSS/z-index
¦ For a positioned box (that is, one with any
¦ position other than static), the z-index property
¦ specifies:
¦ 1. The stack level of the box in the current stacking
¦ context.
¦ 2. Whether the box establishes a local stacking
¦ context.
--
J𝕒𝕞𝕖𝕤 𝕂𝕚𝕣𝕜