How can I ensure that the blue box always stays centered within the red box when resizing the window? Currently, it's not in the correct position. View the example online: http://jsfiddle.net/NVjPF/ Thanks!
<div id="box1">
<div id="box2"></div>
</div>
#box1{
display: block;
background:red;
background-size: 100%;
position: relative;
padding-bottom: 60%;
}
#box2{
display:block;
background:blue;
position:absolute;
height:70px;
width:70px;
right:50%;
top:50%;
}