diff options
| author | Chris Rebert <[email protected]> | 2014-03-27 13:57:50 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-03-27 13:57:50 -0700 |
| commit | b57396944a39b21571848728b6ad479cd50537cd (patch) | |
| tree | b4b9f3064d9e403044d0cc2ee85f35a0cb2f1a6a /docs/examples/equal-height-columns/index.html | |
| parent | 98bddd8904f2d745ad16d8bd591a0771577bf414 (diff) | |
| download | bootstrap-b57396944a39b21571848728b6ad479cd50537cd.tar.xz bootstrap-b57396944a39b21571848728b6ad479cd50537cd.zip | |
Add equal-height grid columns as an experimental example.
Based on @pete-otaqui's work from #11851
Diffstat (limited to 'docs/examples/equal-height-columns/index.html')
| -rw-r--r-- | docs/examples/equal-height-columns/index.html | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/docs/examples/equal-height-columns/index.html b/docs/examples/equal-height-columns/index.html new file mode 100644 index 000000000..8be0837f9 --- /dev/null +++ b/docs/examples/equal-height-columns/index.html @@ -0,0 +1,81 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="description" content=""> + <meta name="author" content=""> + <link rel="icon" href="../../assets/ico/favicon.ico"> + + <title>Equal Height Columns Example for Bootstrap</title> + + <!-- Bootstrap core CSS --> + <link href="../../dist/css/bootstrap.min.css" rel="stylesheet"> + + <!-- Custom styles for this template --> + <link href="equal-height-columns.css" rel="stylesheet"> + + <!-- Just for debugging purposes. Don't actually copy this line! --> + <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]--> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> + <![endif]--> + </head> + + <body> + <div class="container"> + + <div class="page-header"> + <h1>Bootstrap equal-height columns experiment</h1> + <p class="lead">A simple experiment that adds flexbox-based equal-height columns to Bootstrap's grid system.</p> + </div> + + <h3>Normal row (with unequal-height columns)</h3> + <p>For comparison, here's a normal row, <strong>without</strong> <code>.row-eq-height</code>.</p> + <div class="row"> + <div class="col-xs-4">.row > .col-xs-4</div> + <div class="col-xs-4">.row > .col-xs-4<br>this is<br>a much<br>taller<br>column<br>than the others</div> + <div class="col-xs-4">.row > .col-xs-4</div> + </div> + + + <h3>Row with equal-height columns</h3> + <p>This row uses the custom <code>.row-eq-height</code> class defined in <a href="equal-height-columns.css">this example's CSS</a> to make all of its columns automatically be of equal height.</p> + <p>All of the columns will stretch vertically to occupy the same height as the tallest column.</p> + + <div class="row row-eq-height"> + <div class="col-xs-4">.row.row-eq-height > .col-xs-4</div> + <div class="col-xs-4">.row.row-eq-height > .col-xs-4<br>this is<br>a much<br>taller<br>column<br>than the others</div> + <div class="col-xs-4">.row.row-eq-height > .col-xs-4</div> + </div> + + <div class="bs-callout bs-callout-danger"> + <h4>Warning: Browser compatibility</h4> + <p>The <code>.row-eq-height</code> class uses <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes">CSS3's flexbox layout mode</a>, which is not supported in Internet Explorer 9 and below.</p> + <p>In any unsupported browser, the <code>.row-eq-height</code> class will have no effect.</p> + <p>For more info on browser support for flexbox, please consult <a href="http://caniuse.com/flexbox">"Can I use..."</a>.</p> + </div> + <div class="bs-callout bs-callout-warning"> + <h4>Warning: Changes column wrapping behavior</h4> + <p>If you have put than 12 columns in one <code>.row-eq-height</code>, the columns will be forced to shrink into a single row, instead of wrapping onto a new line as they normally would.</p> + </div> + + <h3>Equal-height row with more than 12 columns</h3> + <div class="row row-eq-height"> + <div class="col-xs-4">.row.row-eq-height > .col-xs-4</div> + <div class="col-xs-4">.row.row-eq-height > .col-xs-4</div> + <div class="col-xs-4">.row.row-eq-height > .col-xs-4</div> + <div class="col-xs-4">.row.row-eq-height > .col-xs-4<br>This and subsequent columns would normally have wrapped onto a new line,<br>if not for <code>.row-eq-height</code>.</div> + <div class="col-xs-4">.row.row-eq-height > .col-xs-4<br></div> + </div> + + + </div> <!-- /container --> + + + </body> +</html> |
