Book Image

Getting Started with Zurb Foundation 4

By : Andrew D. Patterson
Book Image

Getting Started with Zurb Foundation 4

By: Andrew D. Patterson

Overview of this book

<p>Every web designer needs a toolkit. From text editors to graphics programs, from table structures to fluid style sheets, the web designer has many tools and techniques to choose from. Zurb's Foundation framework is an excellent kit for today's web designer. It's fluid, it's easy to work with, it has plenty of components, and most importantly, you can apply your creativity to make your very own designs.<br /><br />Zurb's Foundation 4 is a practical, easy-to-use toolkit for the layout and construction of web pages. Getting Started with Zurb Foundation 4 introduces Zurb Foundation’s powerful web design and development toolkit. Learn how to create professional layouts with ease, add powerful CSS and JavaScript components to your pages, and then customize and configure the design to your satisfaction. Understand how to efficiently manage your CSS and layout your pages with SASS, the style sheet language. This book will help you put Foundation 4 to work for you today!<br /><br />This book documents Foundation's grid system, all its components and plugins, and its generation of custom style sheets. The book serves as an all-encompassing introduction as well as a future reference guide. The foundation of Foundation is its grid system...and there is a whole lot more.<br /><br />Once you've covered the basics, you'll be ready to advance with SASS, the style sheet language, to customize your installation and layout your pages.<br /><br />With this book, you will discover all the CSS components and JavaScript plugins that are included in Foundation at the present time and learn how to integrate each of them into your web pages.</p>
Table of Contents (11 chapters)

Maintaining row and page width


The simplest way to set the maximum page width for your website is to put all your content inside a containing row.

<body>
<div id="container" class="row"><div class="large-12 column">
<!-- website content -->
</div></div><!-- end #container -->
</body>

This code creates an outside row with a maximum width equal to the max-width value of the row (the default value is 62.5 em or 1000 px).

As a general rule, while creating an outer containing row, always include a column that has the full width (for example, large-12 columns). Otherwise, the negative margins of an inner row will make your website wider than you anticipated.

Only the outermost row has a specific maximum width value. Inner rows expand to fill the container in which they reside.

While having a single containing row is the simplest way to set the maximum width for your site, you can also build your site in sections. In the blog we created earlier, we had an outside row for each of the three sections: header, main, and footer.

This also works to keep your site at a fixed maximum width. As long as all the content is within those rows, the content will align itself, and the site width will be limited to the maximum width for the outer row class in Foundation.

To override the maximum width of your site in a custom style sheet, simply add a style as follows:

.row { max-width: 128em; }

That's it. Now your outer rows, and therefore your site width, will use as much as 128 em (2048 px). Choose your own maximum width, larger or smaller than the default 62.5 em.