Setup
The setup has been simplified and recreated in the following jsfiddle:
https://jsfiddle.net/wheresmycookie/5L8qu0hx/29/
.section-a
and .section-b
is divided by .horizontal-clickable-container
and I'd like the following two things to be true:
.section-a
has a menu that, when opened (always open in my demo), will be rendered above the.horizontal-clickable-container
and.section-b
..horizontal-clickable-container
's child,.horizontal-clickable-panel
, is supposed to extend up into.section-a
and down into.section-b
by an equal amount.
Problem & what I tried
I have assigned z-indices in descending order (101, 100, 99) so that the menu now renders on top of everything nicely.
Because the indices are in descending order, .horizontal-clickable-panel
(the green strip) is only rendered above .section-b
, not over .section-a
(here it is rendered below).
If I increase the z-index of .horizontal-clickable-container
above that of .section-a
, the menu will then be rendered underneath .horizontal-clickable-panel
because it is in the stacking context of .section-a
.
Question
How can I ensure that .horizontal-clickable-container
(and children) are always rendered above .section-x
s, while at the same time ensuring that .menu
will be rendered on top of everything?