• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 406
  • Last Modified:

Div position: absolute


I have posted my ASP.NET web pages simplified scheme. I would like to set position DIV #popup to absolute to the whole web page. Now it appears absolute to its parent containers. How to position popup div to absolute?

Please note that I can't take out popup div from containers due to nature of my asp.net web page, I just posted example.


HTML  {            height: 100%;        }
BODY {            text-align: center;     padding: 0px;   margin: 15px;  height: 100%;   }
#container   { position: relative;    width: 800px;     text-align: center;    margin: 10 auto 0;    }
#center    {position: relative;    left: 0px;    width: 100%;    }
#popup   { position: absolute; }
<div #container> 
  <div #center>
    <div #popup>

Open in new window

1 Solution
#popup _will_ be absolute to the parents, you would need to set the parent's width and heights to 100% too.

Try to add "top: 10px; left: 10px;" to the #popup, then it'll will take out the parents

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now