O'Reilly logo

Getting Started with Zurb Foundation 4 by Andrew D. Patterson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with images

While designing a website, it is important to understand how images will be presented by default so you can adjust when necessary. In a Foundation-based site, where images are inside a row and column, this is especially true.

An image has an inherent width and height. Styles on the <img> tag will determine how an image will be presented in the browser. The following are Foundation's defaults:

img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

When presented with these defaults, an image will use all the space that it can while being constrained by that space.

The following is an example code that demonstrates these styles:

<div class="row"> <div class="small-3 column"> <img src="http://placehold.it/220x220"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required