How can I get this div to appear above the top div
my firt post here, so please direct me with any mistakes I make and the general culture with these forums.
see below.
<body>
<div class="red">
</div>
<div class="outer">
<div class="planner-table green">
<div class="planner-row">
<div class="planner-cell">
<div class="black"></div>
</div>
</div>
<div class="planner-row">
<div class="planner-cell">
<div class="blue"></div>
</div>
</div>
</div>
</div>
</body>
See the attached script.
This is a simple layout view of a legacy project that blue square
represents the boot file datetimepicker
that has been implemented.
however, when selected, it closes the top of the picker behind the top "RED" div
.
the date pickers Z-index is "9999 !important"
in css. How to get blue box
(date picker view) to show above red div
(top div).
source to share
It has to do with overflow-y: auto
the element .outer
merged with position: relative
. The blue box is clipped because it comes out of the container. The vertical overflow must be visible
on it to make this work.
Now you definitely need position: relative
, and I think you need overflow too. The solution is to place them on different elements, not one. position: relative
should be outside.
One possible way is overflow by .planner-table-green
, so you can keep whatever you want and it will still work:
.outer{
position:relative;
}
.planner-table-green {
overflow-y: auto;
}
Nothing to do with z-index
, you don't need it here, the natural order should be good.
I found the problem with my web browser inspector, systematically disabling CSS properties.
source to share