Center Images with CSS


xHTML code


<div class="post">

<img src="http://blog.pixert.com/wp-content/uploads/2011/03/do-you-have-facebook.jpg" />

</div>

CSS code


.post img { display: block; margin-left: auto; margin-right: auto ; }