Here is jsfiddle: http://jsfiddle.net/techsin/1o5zzcgh/
I want to center two absolutely positioned divs inside each other without using jquery. Right now I'm using top:0, and bottom 0 but when height is defined this doesn't work.
* {
margin: 0;
padding: 0;
}
html, body {
position: relative;
height: 100%;
width: 100%;
}
.in, .out {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.in {
background-color: red;
height: 50%;
}
.out {
background-color: blue;
}