From fcd08fce8faaa9fb1a72516a59d8426a496eac7a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 27 Aug 2012 10:32:07 -0700 Subject: [PATCH] fixes #4578: add clearfix to .navbar-inner to clear floats --- docs/assets/css/bootstrap.css | 12 ++++++++++++ less/navbar.less | 3 +++ 2 files changed, 15 insertions(+) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 2b10e93446..09d85da0e9 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -4113,11 +4113,23 @@ input[type="submit"].btn.btn-mini { -moz-border-radius: 4px; border-radius: 4px; filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + *zoom: 1; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); } +.navbar-inner:before, +.navbar-inner:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-inner:after { + clear: both; +} + .navbar .container { width: auto; } diff --git a/less/navbar.less b/less/navbar.less index 7b941195cc..a1fe00f513 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -27,6 +27,9 @@ border: 1px solid @navbarBorder; .border-radius(4px); .box-shadow(0 1px 4px rgba(0,0,0,.065)); + + // Prevent floats from breaking the navbar + .clearfix(); } // Set width to auto for default container