diff options
| author | Mark Otto <[email protected]> | 2012-08-17 11:46:23 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-08-17 11:46:23 -0700 |
| commit | 077577c7f3e71f7451513059ccd1c3775acc4025 (patch) | |
| tree | 5bd47c141f38afd2122ac01aaa907c0577b7f343 /docs | |
| parent | b86e1fb62a25fcd955b1dbe5764788f2de36b735 (diff) | |
| download | bootstrap-077577c7f3e71f7451513059ccd1c3775acc4025.tar.xz bootstrap-077577c7f3e71f7451513059ccd1c3775acc4025.zip | |
fixes #4421: add static top navbar class
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/assets/css/bootstrap.css | 12 | ||||
| -rw-r--r-- | docs/components.html | 24 | ||||
| -rw-r--r-- | docs/templates/pages/components.mustache | 24 |
3 files changed, 58 insertions, 2 deletions
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index b658de19a..9a6bb867d 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -4138,6 +4138,18 @@ input[type="submit"].btn.btn-mini { border-radius: 15px; } +.navbar-static-top { + position: static; + width: 100%; + margin-bottom: 0; +} + +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; diff --git a/docs/components.html b/docs/components.html index 0b2ba25c7..f3803201a 100644 --- a/docs/components.html +++ b/docs/components.html @@ -1162,7 +1162,7 @@ <hr class="bs-docs-separator"> - <h2>Fixed navigation</h2> + <h2>Optional display variations</h2> <p>Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, <code>.navbar</code>.</p> <h3>Fixed to top</h3> @@ -1209,6 +1209,28 @@ </div> </pre> + <h3>Static top navbar</h3> + <p>Create a full-width navbar that scrolls away with the page by adding <code>.navbar-static-top</code>. Unlike the <code>.navbar-fixed-top</code> class, you do not need to change any padding on the <code>body</code>.</p> + <div class="bs-docs-example bs-navbar-top-example"> + <div class="navbar navbar-static-top" style="margin: -1px -1px 0;"> + <div class="navbar-inner"> + <div class="container" style="width: auto; padding: 0 20px;"> + <a class="brand" href="#">Title</a> + <ul class="nav"> + <li class="active"><a href="#">Home</a></li> + <li><a href="#">Link</a></li> + <li><a href="#">Link</a></li> + </ul> + </div> + </div> + </div> + </div> +<pre class="prettyprint linenums"> +<div class="navbar navbar-static-top"> + ... +</div> +</pre> + <hr class="bs-docs-separator"> diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index f0c4cc73a..8335ccdf9 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -1091,7 +1091,7 @@ <hr class="bs-docs-separator"> - <h2>{{_i}}Fixed navigation{{/i}}</h2> + <h2>{{_i}}Optional display variations{{/i}}</h2> <p>{{_i}}Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, <code>.navbar</code>.{{/i}}</p> <h3>Fixed to top</h3> @@ -1138,6 +1138,28 @@ </div> </pre> + <h3>{{_i}}Static top navbar{{/i}}</h3> + <p>{{_i}}Create a full-width navbar that scrolls away with the page by adding <code>.navbar-static-top</code>. Unlike the <code>.navbar-fixed-top</code> class, you do not need to change any padding on the <code>body</code>.{{/i}}</p> + <div class="bs-docs-example bs-navbar-top-example"> + <div class="navbar navbar-static-top" style="margin: -1px -1px 0;"> + <div class="navbar-inner"> + <div class="container" style="width: auto; padding: 0 20px;"> + <a class="brand" href="#">{{_i}}Title{{/i}}</a> + <ul class="nav"> + <li class="active"><a href="#">{{_i}}Home{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + <li><a href="#">{{_i}}Link{{/i}}</a></li> + </ul> + </div> + </div> + </div> + </div>{{! /example }} +<pre class="prettyprint linenums"> +<div class="navbar navbar-static-top"> + ... +</div> +</pre> + <hr class="bs-docs-separator"> |
