• z index and canvas

    From Andrew Poulos@21:1/5 to All on Mon Aug 10 15:39:22 2020
    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.

    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.

    Andrew Poulos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kirk@21:1/5 to Andrew Poulos on Mon Aug 10 06:56:54 2020
    In Message: <mcudnQX2-6kQQK3CnZ2dnUU7-SnNnZ2d@westnet.com.au>
    Andrew Poulos <ap_prog@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.

    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?


    --
    Jš•’š•žš•–š•¤ š•‚š•šš•£š•œ

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kirk@21:1/5 to James Kirk on Mon Aug 10 15:09:24 2020
    In Message: <20200810065654.27f62f24@james.kirk.invalid>
    James Kirk <noneya.invalid@gmail.com> wrote:

    In Message: <mcudnQX2-6kQQK3CnZ2dnUU7-SnNnZ2d@westnet.com.au>
    Andrew Poulos <ap_prog@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š•’š•žš•–š•¤ š•‚š•šš•£š•œ

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)