Reading time: 1 mins

CSS to resize / crop / center background image

If you are using a full screen background image, there is a convensional way too, using javascript which is too complex.

The CSS method described in this post requires no javascript and is compatible on most of the modern browsers. That includes IE 9 and higher.

-webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
Chain Animation function using deffer / promise in jquery
Delegate / bind toggle event jquery
© 2023 Anil Maharjan