How to center vertical modal window with such css style:
.inquiry_form_container {
left: 50%;
margin-left: -375px;
width: 750px;
top: 150px;
position: fixed;
z-index: 10001;
background: #fff;
border: 1px solid #cccccc;
display: block;
-webkit-box-shadow: 0 0 10px #cccccc;
-moz-box-shadow: 0 0 10px #cccccc;
-o-box-shadow: 0 0 10px #cccccc;
box-shadow: 0 0 10px #cccccc;
}
it’s has a non known height, how to do, that that window will be with same margins from top and bottom?
You may have the right idea using
left:50%but I would use 2 DIVs. One inside the other:The first DIV would have
position:relative,left:50%andwidth:0px.The second DIV (inside) would have
position:absolute,width:200pxandleft:-100px.Not sure what to do about the unknown height. How about a pixel height on the second DIV and use
overflow-y:scroll?