				<div class="intro">
                    <p>
                    <b>This component is from <a href="http://purecss.io/grids/">Pure Grids</a></b>, which has much more documentation and examples about how Grids work.
                    </p>

                    <p class="deprecated"><em>
<strong>Note:</strong> The file "grids.css" is deprecated, use "cssgrids.css" instead.
                    </em></p>
					<p>The foundational CSS Grids provides a simple system for laying out content.  The basic components are "grids" and "units".  A "grid" (<code>yui3-g</code>) contains one or more "units" (<code>yui3-u</code>).  The type of "unit" chosen describes how it should be sized (e.g. "yui3-u-1-2" takes up half the grid, "yui3-u-1-3" takes up one-third, et cetera). The only constraints for YUI3 Grids are that all "units" are children of a "grid". All you need to do is define a grid, one or more units inside it, and specify widths for them. Then stack and nest as required.</p>
                </div>

					<h2 id="start">Getting Started</h2>

					<h3 id="dependencies">Include Dependencies</h3>

					<p>To use CSS Grids, include the following source file in your web page with the link element.</p>

```
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/{{yuiVersion}}/build/cssgrids/cssgrids-min.css">
```
                        <p>If you want responsive behavior, pull down <a href="#responsive">Responsive Grids</a> instead.</p>





                        <h2 id="using">Using YUI CSS Grids</h2>

                        <h3>Unit Sizes</h3>
                        <p>All of the sizing for YUI Grids is done using "units".  Units can be subdivided up to 1/24 of the available width.  The following table gives the various unit classes that can be applied.</p>
                        <table class="auto">
                            <thead>
                                <tr>
                                    <th>Class</th>
                                    <th>Description</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><code>.yui3-u</code></td>
                                    <td>Shrinks to fit unless a width is applied.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-1</code></td>
                                    <td>Fills 100% of the available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-1-2</code></td>
                                    <td>Fills 1/2 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-1-3</code></td>
                                    <td>Fills 1/3 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-2-3</code></td>
                                    <td>Fills 2/3 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-1-4</code></td>
                                    <td>Fills 1/4 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-3-4</code></td>
                                    <td>Fills 3/4 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-1-5</code></td>
                                    <td>Fills 1/5 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-2-5</code></td>
                                    <td>Fills 2/5 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-3-5</code></td>
                                    <td>Fills 3/5 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-4-5</code></td>
                                    <td>Fills 4/5 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-1-6</code></td>
                                    <td>Fills 1/6 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-5-6</code></td>
                                    <td>Fills 5/6 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-1-8</code></td>
                                    <td>Fills 1/8 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-3-8</code></td>
                                    <td>Fills 3/8 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-5-8</code></td>
                                    <td>Fills 5/8 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-7-8</code></td>
                                    <td>Fills 7/8 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-1-12</code></td>
                                    <td>Fills 1/12 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-5-12</code></td>
                                    <td>Fills 5/12 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-7-12</code></td>
                                    <td>Fills 7/12 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-11-12</code></td>
                                    <td>Fills 11/12 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-1-24</code></td>
                                    <td>Fills 1/24 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-5-24</code></td>
                                    <td>Fills 5/24 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-7-24</code></td>
                                    <td>Fills 7/24 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-11-24</code></td>
                                    <td>Fills 11/24 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-13-24</code></td>
                                    <td>Fills 13/24 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-17-24</code></td>
                                    <td>Fills 17/24 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-19-24</code></td>
                                    <td>Fills 19/24 of available width.</td>
                                </tr>
                                <tr>
                                    <td><code>.yui3-u-23-24</code></td>
                                    <td>Fills 23/24 of available width.</td>
                                </tr>
                            </tbody>
                        </table>

                <h3 id="page_width">Building a Page Template</h3>

                <p>The sizing of "units" is done using percentages, so in order to build a "page" template, a width on the outermost container is required.  The simplest approach to fixing your page size is to apply a width directly to the body element.  Optionally, the page can be centered in the viewport by  setting the <code>margin</code> to <code>auto</code>.  The following creates a 960px, centered layout.</p>

```
body {
    margin: auto; /* center in viewport */
    width: 960px;
}
```

            <p>The next step is to decide on the size of each "column" and choose the appropriate "unit".  Remember, units sizes are percentage-based, so a bit of math may be required when designing with pixels rather than proportions.  To create a 200 pixel wide sidebar, assuming a 960px layout, we would use a 5/24 unit ("yui3-u-5-24") for the narrow column, and a 19/24 ("yui3-19-24") for the main column.</p>

```
<head>
    <style>
    body {
        margin: auto; /* center in viewport */
        width: 960px;
    }

    </style>
</head>

<body>
    <div class="yui3-g">
        <div class="yui3-u-5-24">

        </div>
        <div class="yui3-u-19-24">

        </div>
    </div>
</body>
```
        <h3 id="pixels">Pixel Units</h3>
        <p>Some layouts have precise sizing requirements that may not always be fulfilled by percentage-based units.  Custom unit sizes may be applied using the generic unit ("yui3-u").  Rather than overriding the YUI units, custom sizing should be done using your own semantic markup.  To recreate the previous example with custom units, we will add IDs to the column containers.  This examples uses "nav" and "main", but these should be tailored to your content.</p>

```
<head>
    <style>
    body {
        margin: auto; /* center in viewport */
        width: 960px;
    }

    #nav {
        width: 200px;
    }

    #main {
        width: 760px;
    }

    </style>
</head>

<body>
    <div class="yui3-g">
        <div class="yui3-u" id="nav">

        </div>
        <div class="yui3-u" id="main">

        </div>
    </div>
</body>
```

```
<head>
    <style>
    body {
        margin: auto; /* center in viewport */
        width: 960px;
    }

    #nav {
        width: 200px;
    }

    #main {
        width: 760px;
    }

    </style>
</head>

<body>
    <div class="yui3-g">
        <div class="yui3-u" id="nav">

        </div>
        <div class="yui3-u" id="main">

        </div>
    </div>
</body>
```


        <h2 id="responsive">Responsive Grids</h2>

        <p>To pull down Responsive Grids, include this link element on your page:</p>
```
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/{{yuiVersion}}/build/cssgrids-responsive/cssgrids-responsive-min.css">
```

        <p>YUI Responsive Grids builds on top of the existing YUI Grids implementation. It adds a single new class name called `.yui3-g-r`. You can use this instead of using `.yui3-g` as you normally do. All elements with a class name of `.yui3-u-*-*` will automatically become responsive if they are direct descendents of a `.yui3-g-r`. Images will shrink to fit the viewport, and units will collapse to 100% width when the viewport is 767px or below.</p>

        <p>For example, consider the two HTML snippets below. The first gist shows how regular YUI grids are written. These grids are unresponsive. They’ll always be one-thirds irrespective of the width of the screen. The second gist replaces the `yui3-g` with `yui3-g-r`, thereby making the one-third columns collapse to full width on lower screen widths.</p>

```
<div class='yui3-g'>
   <div class="yui3-u-1-3">...</div>
   <div class="yui3-u-1-3">...</div>
   <div class="yui3-u-1-3">...</div>
</div>

```

```
<div class='yui3-g-r'>
   <div class="yui3-u-1-3">...</div>
   <div class="yui3-u-1-3">...</div>
   <div class="yui3-u-1-3">...</div>
</div>
```

        <p>If you want some HTML elements to remain in a grid even on smaller screens, wrap them in the standard `.yui3-g`</p>


        <h3>Media Queries</h3>

        <p>Responsive Grids listens to the following media queries. All `yui3-u-*` elements inside a `yui3-g-r` become 100% width at 767px or below.</p>

        <table>
            <thead>
                <tr>
                    <th>Type of Display</th>
                    <th>Media Query Widths</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Default Displays</td>
                    <td>980px and up</td>
                </tr>
                <tr>
                    <td>Large Tablets</td>
                    <td>768px to 979px</td>
                </tr>
                <tr>
                    <td>Smaller Tablets and Large Phones</td>
                    <td>767px and below</td>
                </tr>
                <tr>
                    <td>Phones</td>
                    <td>480px and below</td>
                </tr>
            </tbody>
        </table>

        <p>Responsive Grids also comes with the following helper classes to show or hide content at different screen widths. Remember that to optimize performance and page load time, you should ideally determine what to show and hide on the server, instead of on the client.</p>

        <table>
            <thead>
                <tr>
                    <th>Helper Class Name</th>
                    <th>Description</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>`yui3-hidden-phone`</td>
                    <td>Content marked with this class will be hidden below 768px</td>
                </tr>
                <tr>
                    <td>`yui3-hidden-tablet`</td>
                    <td>Content marked with this class will be hidden between 768px and 979px</td>
                </tr>
                <tr>
                    <td>`yui3-hidden-desktop`</td>
                    <td>Content marked with this class will be hidden above 980px</td>
                </tr>
            </tbody>
        </table>

