I added a popover to a page and it is unaffected by any CSS applied to its ancestors.
How can I place the popover at the bottom of the viewport by using a flexbox parent element like this:
#popoverparent {
display: flex;
flex-direction: column;
min-height: 100vh;
justify-content: flex-end;
z-index: 1;
}
#mypopover {
display: block;
z-index: 1;
}
<div id="popoverparent">
<div id="mypopover" popover="manual">
<p>Some text.</p>
<p><button popovertarget="mypopover" popovertargetaction="toggle">Close</button></p>
</div>
</div>
2
Answers
The answer to my question is using identical
z-index
values for parent and popover. Ali's answer helped with the actual positioning.Maybe that can work for you.
For example,
index.html
style.css
I hope it works