Hi does anyone know how do I push the child div to behind of the parent? I want parent to cover the child completely but z-index doesnt’ seems to work for my case. Any help greatly appreciated.
Thanks for your reply ralph, actually this is div box with a resize handle. I wanted to use a background image for the handle so I added a “child” in the parent.
<style>
.ui-resizable-s { // The resize handle
bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */
width: 100% !important;
height: 8px !important;
overflow: hidden !important;
line-height:12px !important;
font-size: 11px !important;
text-align: center;
cursor: s-resize;
}
.resizable { /* I added this child */
width:13px;
height:6px;
background:url(../../../../../../www/themes/img/imageset.png) no-repeat;
margin:auto; // centralize the div
}
</style>
<div class='ui-resizable-s'><div class='resizable'></div>
Cosmetic wise is showing up great but when I mouse over the resize handle, it broke my jquery drag functionality. The ‘child’ div being in the front seems to block the handle, hence I need to push it behind by using z-index. Any advise is greatly appreciated.
I can’t just add it in, the ui-resizable-s is provided by the third party plugin and it is with a width of 100% which is needed to cover up the entire div width. My own added .resizable has a width of 13px which is an icon.
Ok very sorry I missed this part. Because my imageset is a full image with multiple icons and I have a position set for different handle.
.blueResizable { background-position: 0px -394px; }
.redResizable { background-position: -13px -394px; }
// So in javascript, it is actually like this:
html +="<div class='ui-resizable-s'><div class='resizable " + div.className + "Resizable'></div></div>";
So .resizable is actually like a “universal” holder to hold the image.
If you have to say !important that many times, and up-tree link (…/) that many times, there is something HORRENDOUSLY WRONG with what you are working on.