<div class="container"> <span class="img center"></span> </div>
.container { background-color: #eee; height: 200px; position: relative; } .img { display: inline-block; width: 64px; height: 64px; background-color: green; } .center { position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; overflow: auto; }