From f15eb7b499e3afa628b7baba1b02eed4fc079d33 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 26 Aug 2012 23:06:56 -0700 Subject: [PATCH] fixes #4506: clearfix added to .dl-horizontal to account for empty dd elements --- docs/assets/css/bootstrap.css | 15 +++++++++++++++ less/type.less | 1 + 2 files changed, 16 insertions(+) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index c01aa8c36a..c935c084cf 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -725,6 +725,21 @@ dd { margin-left: 10px; } +.dl-horizontal { + *zoom: 1; +} + +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + line-height: 0; + content: ""; +} + +.dl-horizontal:after { + clear: both; +} + .dl-horizontal dt { float: left; width: 120px; diff --git a/less/type.less b/less/type.less index 58723f788c..5557b7e4a2 100644 --- a/less/type.less +++ b/less/type.less @@ -116,6 +116,7 @@ dd { } // Horizontal layout (like forms) .dl-horizontal { + .clearfix(); // Ensure dl clears floats if empty dd elements present dt { float: left; width: 120px;