Skip to content

Commit

Permalink
Fixes twbs#8749: prevent navbar nav from overlapping navbar toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Aug 7, 2013
1 parent 223e032 commit c3ac953
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion dist/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -2811,7 +2811,6 @@ button.close {
}

.navbar-nav {
margin-top: 10px;
margin-bottom: 15px;
}

Expand Down Expand Up @@ -2893,6 +2892,11 @@ button.close {
clear: both;
}

.navbar-toggle + .nav-collapse {
width: 100%;
margin-top: 50px;
}

@media (max-width: 768px) {
.nav-collapse-scrollable {
max-height: 360px;
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions less/navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
// -------------------------

.navbar-nav {
// Space out from .navbar .brand and .btn-navbar when stacked in mobile views
margin-top: 10px;
margin-bottom: 15px;

> li > a {
Expand Down Expand Up @@ -93,8 +91,16 @@
padding-bottom: @navbar-padding-vertical;
// Clear floated elements and prevent collapsing of padding
.clearfix();

// When there is no `.navbar-brand` present (which normally sits between the
// navbar brand and toggle), prevent the nav from overlapping the toggle.
.navbar-toggle + & {
width: 100%;
margin-top: @navbar-height;
}
}


// Scrollable navbar navigation
//
// Sometimes you might have too many links in your fixed navbar and you need to
Expand Down

0 comments on commit c3ac953

Please sign in to comment.