Tuesday, May 26, 2015

How to proportionally scale images that have dimension attributes

Allowing images to scale along with their container is an important part of responsive web design (and was so even before the term "responsive web design" existed). It's really quite easy – all you need to do is give the image a width (or max-width) in percent.

This will prevent any img element from getting wider than its container. If the container is narrower than the image, the image will scale down. But there is a catch.

Read full post

Posted in .

Copyright © Roger Johansson


456 Berea Street

Здесь можно оставить свои комментарии. Выпуск подготовленплагином wordpress для subscribe.ru

No comments:

Post a Comment