Despite being new to CSS, I've experimented with various approaches but am struggling to center my div vertically.
Parent :
#ModalScroll{
position:absolute;
top:0;
left:0;
z-index:1001;
height:1px;
width:1px;
overflow:hidden;
display:none;
font-size:100%;
text-align:left;
}
Child :
.ModalDialog{
border:1px solid #3C4749;
background-color:#FFF;
margin:0 auto 0 auto;
display:none;
font-size: 12px;
box-sizing: border-box;
width: 280px;
height: 160px;
position: absolute;
left: 50%;
top: 50%;
margin: -80px 0 0 -140px;
}
I'm uncertain whether a jQuery solution would be more appropriate, but I'd prefer to find a CSS-based one.