Quick Tip : How to make responsive images

Advertisement

When you need to make your website responsive, one common problem is to make all your images adapt to the layout.
With this tip you will be able to force all images to be adaptive,  all your images will be automatically resized to fit the viewport.

here is the code :

img{
   max-width: 100%;
   height: auto;
   width: auto; /* IE8 fix */
   box-sizing: border-box;
}

With this combo you’re ready to go.

Quick Tip : How to make responsive images
Rate this post

Advertisement

By Claude

Web and mobile designer, founder of Layerbag. I started designing & I fell in love with Wordpress so I maintain a blog around my favorites topics and develop Wordpress themes myself.

Leave a Comment

Instagram

  • #minimalism #minimalist #minimal #interior #interiors #interiordesign #inspire #inspired #inspiring #inspiration
  • Summer feel #inspire #inspired #inspiring #inspiration
  • #workspace #workspaces #minimal #minimalism #inspiration #inspired #inspiring #interior #interiors #interiordesign
  • #architecture #architectureporn #design #interiordesign #inspire #inspired #inspiration
  • #car #cars #carinspo #inspiration
  • #women #womenswear #womenexcellence #inspo #inspire #inspiration #fitgirl #fashion
  • #minimalism #minimal #summertime #summervibes #inspire #inspired #inspiration
  • NQ house #inspiration #inspired #inspire #architecture #archilovers #architectureporn #architecturephotography #dreamhome
  • #interiors #interiors #interiordesign #eamesera #inspire #inspiration #inspired #homedecor
  • #interiordesign #interior #interiorstyle #interiors #interiorinspo #design #inspire #inspiring #inspiration

Follow Me!