I have a modal window, which opens on the click of the user. I am trying to center it and use standard CSS code:
.layout: {
position: "absolute";
left: "50%";
top: "50%";
}
But it centers element inside its parent, and I don't know why, because a parent has static position (so absolute should count from the edge of the screen, not a parent). How to fix it? Here is the structure of a modal window:
<div class="layout">
<div class="window">
<!--some code --!>
</div>
</div>