Center an image horizontally using CSS

Try this for your CSS:

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

and then add to your image to center it:

class="center"

use position absolute and margin like this

img.loading{
  position: absolute;
  left: 50%;
  margin-left: -(half ot the image width)px
}