I'm working on a plugin that allows popover panels in Jquery Mobile.
A panel will look like this:
<div data-role="panel" data-panel="popover" data-id="my_name">
// JQM pages
</div>
and goes after the content section of a JQM page.
Sample (buggy) here: sample
Panels behave like viewports or pageContainers. JQM by default only uses the body as pageContainer. My plugin also allows panels, so you integrate popovers into the normal navigation.
My problem:
I added triangles to the popovers, but I need to keep panel CSS overflow-x: hidden thereby hiding triangles. If I comment out overflow:hidden, the triangle is visible, but when I'm changing pages, the panel "bleeds out", like so:
As the content section determines the scrollbar, I tried shuffling overflow:hidden around, also setting it on the page inside the popover but nothing works. I don't want to move the triangle outside of the panel, so:
Question:
Is there a way to show a child element outside of a parent with overflow:hidden or why do does setting overflow-x:hidden hide my triangle, which is on top/bottom (more y than x)?
Just looking for some ideas or other workarounds.
Thanks for help!
EDIT: here is the triangle CSS:
.popover_triangle {
position: absolute;
line-height: 0%;
width: 0px; border-top: 16px solid rgba(0,0,0,0);
border-left: 16px solid rgba(0,0,0,0);
border-right: 16px solid rgba(0,0,0,0);
border-bottom: 16px solid black;
}
.ui-triangle-top .popover_triangle {
top: -32px;
}
.ui-triangle-bottom .popover_triangle {
bottom: -34px;
}
The popover has:
.ui-popover {
position: absolute;
z-index:1005 !important;
border: 3px solid black;
border-radius: 4px;
left: auto;
}
.popover1 {
margin-top: 3.25em;
right: 5em;
height:25em;
width: 15em;
top: 0;
}