Override absolute position on child container (modal window)

Posted by Shawn Mclean on Stack Overflow See other posts from Stack Overflow or by Shawn Mclean
Published on 2010-04-19T08:29:32Z Indexed on 2010/04/20 0:23 UTC
Read the original article Hit count: 285

Filed under:
|

I have a modal window that is pulled from the server and inserted into a container that is absolute positioned. When that window is triggered to open, it does not display properly, it positions itself inside the container and most of it is hidden.

Is there a specific css to be written for the container of the modal window (MyModalWindow). My code is as follows:

<div style="position:relative;">
   <div style="position: absolute;">
     <div id="MyModalWindow"> </div>
   </div>
</div>

This is a jquery tools window and attaches the following style to MyModalWindow when it shows.:

element.style  {
   display:block;
   left:183.5px
   position:absolute;
   top:468.4px;
   z-index:9999;
} 

I basically need the div to not be a child of the parent, since as jquery calculates it to be positioned at the center of the webpage no matter where the div is.

© Stack Overflow or respective owner

Related posts about css

Related posts about jQuery