I found some solutions for how to center a popup div in the hole screen, but I need to center it (vertically and horizontally too) inside its parent div. The popup doesn't have fixed sizes, they are relative to the parent div's sizes. I haven't found anything about this and I couldn't do it myself. So please help if you have any ideas.
Here's my code: http://jsfiddle.net/crXCz/
<div id="container" style="width: something; height: something;> some text <br> some text
<div class="popup"></div>
</div>
div.popup {
height: 95%;
width: 95%;
border-color: #d3d7cf;
border-width: 2px;
border-style: solid;
border-radius: 10px;
background-color: #f3f3f3;
z-index: 1;
}