1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

set width to auto for default navbar container, then override it later for fixed navbars (done all via the #gridSystem mixins)

This commit is contained in:
Mark Otto 2012-02-21 23:15:43 -08:00
parent 9b524a16e9
commit a139167489
7 changed files with 21 additions and 7 deletions

Binary file not shown.

View file

@ -174,7 +174,7 @@
float: left;
margin-left: 20px;
}
.container {
.container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
width: 724px;
}
.span1 {
@ -607,7 +607,7 @@
float: left;
margin-left: 30px;
}
.container {
.container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
width: 1170px;
}
.span1 {

View file

@ -134,7 +134,7 @@ a:hover {
float: left;
margin-left: 20px;
}
.container {
.container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
width: 940px;
}
.span1 {
@ -2698,6 +2698,9 @@ button.btn.btn-small, input[type="submit"].btn.btn-small {
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
.navbar .container {
width: auto;
}
.btn-navbar {
display: none;
float: right;

View file

@ -873,7 +873,7 @@
<p>An example of a static (not fixed to the top) navbar with project name, navigation, and search form.</p>
<div class="navbar">
<div class="navbar-inner">
<div class="container" style="width: auto;">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View file

@ -797,7 +797,7 @@
<p>{{_i}}An example of a static (not fixed to the top) navbar with project name, navigation, and search form.{{/i}}</p>
<div class="navbar">
<div class="navbar-inner">
<div class="container" style="width: auto;">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>

View file

@ -173,8 +173,13 @@
#gridSystem > .gridColumn(@gridGutterWidth);
}
// Fixed container
.container { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @gridColumns); }
// Fixed containers
// Default container and reset for fixed navbars
.container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
#gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @gridColumns);
}
// Default columns
.span1 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }

View file

@ -20,6 +20,12 @@
.box-shadow(@shadow);
}
// Set width to auto for default container
// We then reset it for fixed navbars in the #gridSystem mixin
.navbar .container {
width: auto;
}
// Navbar button for toggling navbar items in responsive layouts
.btn-navbar {
display: none;