I think there is some problem with z-index
as per your description
This might help
Mobile WebKit and Chrome 22+, a new stacking context is created by position: fixed
, even when z-index
is auto
.
So the stacking context hierarchy looks like this:
- document root (z-index
0
)#element
(z-index9998
)#element2
(z-index0
).aboveElement
(z-index9999
).belowElement
(z-index9997
)
You cannot compare 9998
with 9999
or 9997
to determine stacking order. Instead, 9999
is compared with 9997
to determine which of .aboveElement
and .belowElement
is further in front, and then once everything inside #element2
is stacked in that context, it's treated as a single layer at z-index 0
which gets stacked behind #element
at z-index 9998
.