Imagefill.js - Optimize and Center Responsive Image
comment 0

Image Fill and Centering Using Imagefill.js

Imagefill.js is a jQuery plugin by John Polacek for making images fill their containers and centered, a feature that could be useful in a responsive website. You can use this plugin in 3 different ways namely simple, grid and different sizes.

  1. Simple – A single image sitting in a single block container .
  2. Grid – A series of similar sized images  arranged in a regular grid form.
  3. Different sizes – A series of variable sized images arranged in a complex grid form such as using jQuery Masonry.

Hit view more to learn more about the implementation. Resize your browser to see how the demo works on different screen sizes.

View More   View Demo

Filed under: JavaScript

About the Author

Posted by

Sani Halid is a front-end developer at Stampede and is committed to clean and elegant code. Yet another gamer to join the pack, Sani is also the Editor at Constructs where he shares his daily CSS findings and other front-end development goods.

Leave a Reply