diff options
author | Mark Otto <markotto@twitter.com> | 2012-08-28 09:42:12 +0400 |
---|---|---|
committer | Mark Otto <markotto@twitter.com> | 2012-08-28 09:42:12 +0400 |
commit | 609142eee254ef0981a72a1921a053d2a7f16bc6 (patch) | |
tree | 2021d8a7a99d174ba0a6e613c340084d1613be66 | |
parent | 7d412b1e14ea47884b5e3fd77fe0e7734f3cdd97 (diff) |
fixes #4729: only use margin-top on .help-block when it follows an input, select, textarea
-rw-r--r-- | docs/assets/css/bootstrap.css | 7 | ||||
-rw-r--r-- | less/forms.less | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 96d5500d6d..0cef969da0 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1792,10 +1792,15 @@ legend + .control-group { } .form-horizontal .help-block { - margin-top: 10px; margin-bottom: 0; } +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block { + margin-top: 10px; +} + .form-horizontal .form-actions { padding-left: 160px; } diff --git a/less/forms.less b/less/forms.less index d2445b987f..2864bff0db 100644 --- a/less/forms.less +++ b/less/forms.less @@ -633,9 +633,16 @@ legend + .control-group { } // Remove bottom margin on block level help text since that's accounted for on .control-group .help-block { - margin-top: @baseLineHeight / 2; margin-bottom: 0; } + // And apply it only to .help-block instances that follow a form control + input, + select, + textarea { + + .help-block { + margin-top: @baseLineHeight / 2; + } + } // Move over buttons in .form-actions to align with .controls .form-actions { padding-left: 160px; |