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

Who is Participating?
Try to add "top: 10px; left: 10px;" to the #popup, then it'll will take out the parents
#popup _will_ be absolute to the parents, you would need to set the parent's width and heights to 100% too.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.