How can I horizontally center a div within a div using CSS? i am trying and i get the it centered from left and right but i cant get it centered from top and bottom.
html {
height:100%;
}
body {
padding:0px;
margin: 0px;
height:100%;
}
#openFrame {
position:fixed;
top:0px;
width:100%;
left:0%;
height:100%;
}
.main {
position: absolute;
width: 80%;
max-height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
#vid {
width:100%;
max-height:100%;
vertical-align: middle;
}
#bottom {
width:100%;
height:69px;
background-color: green;
background-repeat: no-repeat;
background-position: top center;
background-size: contain;
}