Center div
.centered {
width: 100px; height: 100px; /* must be present. No matter what the values are */
position: absolute; /* to props top/bottom take effect */
margin: auto; /* here's the magic. */
bottom: 0px; top: 0px; /* This is how you center a block verticaly; */
left: 0px; right: 0px; /* or both vertically AND horizontally. */
}