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

Tabs


Tabs can be a really useful way to handle content, so let's cover how to use tabs. After our accordion code on or around line 294, let's add the following code:

<ul class="tabs" data-tab>
  <li class="tab-title active"><a href="#panel1">Tab 1</a></li>
  <li class="tab-title"><a href="#panel2">Tab 2</a></li>
</ul>
  <div class="tabs-content">
    <div class="content active" id="panel1">
      <p>Panel 1</p>
    </div>
    <div class="content" id="panel2">
      <p>Panel 2</p>
    </div>
</div>

Now go ahead and refresh your browser and you will see that you can have two clickable tabs. You can add more tabs by adding or duplicating the li tag with tab-title and if you add more make sure that you also add the content inside of the "tabs-content" div. If you want to make your tabs vertical you can add the "vertical" class to after the "tabs" and "tabs-content" classes. The...