diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index b658de19a7..9a6bb867d4 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 0b2ba25c7b..f3803201aa 100644 --- a/docs/components.html +++ b/docs/components.html @@ -1162,7 +1162,7 @@
-

Fixed navigation

+

Optional display variations

Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, .navbar.

Fixed to top

@@ -1209,6 +1209,28 @@ </div> +

Static top navbar

+

Create a full-width navbar that scrolls away with the page by adding .navbar-static-top. Unlike the .navbar-fixed-top class, you do not need to change any padding on the body.

+
+ +
+
+<div class="navbar navbar-static-top">
+  ...
+</div>
+
+
diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index f0c4cc73a0..8335ccdf96 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -1091,7 +1091,7 @@
-

{{_i}}Fixed navigation{{/i}}

+

{{_i}}Optional display variations{{/i}}

{{_i}}Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, .navbar.{{/i}}

Fixed to top

@@ -1138,6 +1138,28 @@ </div> +

{{_i}}Static top navbar{{/i}}

+

{{_i}}Create a full-width navbar that scrolls away with the page by adding .navbar-static-top. Unlike the .navbar-fixed-top class, you do not need to change any padding on the body.{{/i}}

+
+ +
{{! /example }} +
+<div class="navbar navbar-static-top">
+  ...
+</div>
+
+
diff --git a/less/navbar.less b/less/navbar.less index 8d82bec318..3a7e074b29 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -140,8 +140,22 @@ -// FIXED NAVBAR -// ------------ +// Static navbar +// ------------------------- + +.navbar-static-top { + position: static; + width: 100%; + margin-bottom: 0; // remove 18px margin for default navbar + .navbar-inner { + .border-radius(0); + } +} + + + +// Fixed navbar +// ------------------------- // Shared (top/bottom) styles .navbar-fixed-top, @@ -150,7 +164,7 @@ right: 0; left: 0; z-index: @zindexFixedNavbar; - margin-bottom: 0; // remove 18px margin for static navbar + margin-bottom: 0; // remove 18px margin for default navbar .navbar-inner { border: 0; }