CodePen

HTML

            
              <div>
  <img src="http://placekitten.com/300/200" alt="kitty">
</div>
            
          
!

CSS

            
              div { width: 550px; height: 250px; background: red; }

img { display: block; margin: 0 auto; }
            
          
!

JavaScript

            
              
            
          
!
999px
Loading ..................