From 360f0c5359917d3a54d4822a7cc348ef787fef12 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 17 Jan 2013 11:20:19 -0800 Subject: [PATCH] Fix floats in navbar --- docs/assets/css/bootstrap.css | 5 ++++- less/navbar.less | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 016c320e1d..151c3dd02c 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3046,6 +3046,7 @@ button.close { margin-left: -15px; } .navbar .nav { + float: left; margin-top: 0; } .navbar .nav:before, @@ -3056,6 +3057,9 @@ button.close { .navbar .nav:after { clear: both; } + .navbar .nav.pull-right { + float: right; + } .navbar .nav > li { float: left; } @@ -3063,7 +3067,6 @@ button.close { display: none; } .nav-collapse.collapse { - float: left; height: auto !important; overflow: visible !important; } diff --git a/less/navbar.less b/less/navbar.less index c879e9d465..be2073fa2e 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -76,8 +76,8 @@ background-color: @navbar-link-bg-active; } } -@media screen and (min-width: 768px) { +@media screen and (min-width: 768px) { .navbar { padding-top: 0; padding-bottom: 0; @@ -89,8 +89,13 @@ margin-left: -15px; } .navbar .nav { - .clear_float(); + float: left; margin-top: 0; // undo top margin to make nav extend full height of navbar + .clear_float(); + + &.pull-right { + float: right; + } } .navbar .nav > li { float: left; @@ -101,11 +106,9 @@ display: none; } .nav-collapse.collapse { - float: left; height: auto !important; overflow: visible !important; } - } // Inverse navbar