Book Image

Learning Zurb Foundation

By : Kevin Horek
Book Image

Learning Zurb Foundation

By: Kevin Horek

Overview of this book

<p>Responsive web design is the next big thing in web design right now. It allows you to control and adapt to the user experience across a variety of devices, screens, and resolutions. Foundation is one of the most well-known responsive frameworks available, and allows you to speed up the prototyping, designing, and theming of your web project; as well as allowing you to create your own custom themes to suit your needs. It makes your life easier by giving you a grid, elements, and JavaScript functions that are responsive and easily customized to work with any web or mobile project that arises.</p> <p>This book starts off with teaching you the basics, and gradually moves on to cover the most advanced parts of this amazing framework. You will learn how to use Foundation to prototype, design, and theme your projects as well as discover how to use the framework with any programming language or content management system.</p>
Table of Contents (17 chapters)
Learning Zurb Foundation
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Centering columns in the grid


One of the most common things you would want to do is center a number of columns, and Foundation makes this really easy. You do this by adding the grid size and then -centered. So, to center your columns on a small screen, you will add the small-centered class. The following example shows you how to center eight columns on a small screen:

<div class="row">
  <div class="small-8 small-centered columns">3 centered</div>
</div>

Basically, it looks the same as how you would declare the small columns, but you just add the extra CSS class small-centered. If you do not want these columns centered on a large screen, add the large-uncentered class, as shown in the following code:

<div class="row">
  <div class="small-6 small-centered large-uncentered columns">6 centered on small but not on large</div>
</div>

As you can start to see, Foundation gives you a lot of control over the grid; let's cover some other grid features.