Center an image with CSS

Nice and simple. In your CSS:

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

And then in your HTML:

Suni

Courtesy of about tech