]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fixes #4718: add vertical-align: middle; to .btn-group to ensure proper alignment...
authorMark Otto <markotto@twitter.com>
Mon, 27 Aug 2012 19:05:15 +0000 (12:05 -0700)
committerMark Otto <markotto@twitter.com>
Mon, 27 Aug 2012 19:05:15 +0000 (12:05 -0700)
docs/assets/css/bootstrap.css
less/button-groups.less
less/tests/css-tests.html

index 7ef011cec663e3cf249abb28229bd1fbda7fc684..0d5a5a6eb36ed87395b8bb02990cb2c5983f80e1 100644 (file)
@@ -3388,6 +3388,7 @@ input[type="submit"].btn.btn-mini {
   *margin-left: .3em;
   font-size: 0;
   white-space: nowrap;
+  vertical-align: middle;
 }
 
 .btn-group:first-child {
index 77496d6ab8d806fa55cd56dbc6b5818a0077881e..7bd639aac4ffa49f1b02bd01e6854b6822a514e2 100644 (file)
@@ -7,6 +7,7 @@
 .btn-group {
   position: relative;
   font-size: 0; // remove as part 1 of font-size inline-block hack
+  vertical-align: middle; // match .btn alignment given font-size hack above
   white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
   .ie7-restore-left-whitespace();
 }
index c922f07db39159c67ffdc0975b9c31e104636c6a..1ab21f1bf39f07a29a75405893790c38f05bf56c 100644 (file)
   <h1>Forms</h1>
 </div>
 
+<h4>Buttons and button groups</h4>
+<form class="form-inline">
+  <button class="btn btn-success">Save</button>
+  <button class="btn btn-info">Add new</button>
+  <div class="btn-group">
+    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
+      <i class="icon-user"></i> User
+      <span class="caret"></span>
+    </a>
+    <ul class="dropdown-menu">
+      <li><a href="#">Profile</a></li>
+      <li class="divider"></li>
+      <li><a href="#">Sign Out</a></li>
+    </ul>
+  </div>
+</form>
+
 <h4>Horizontal form errors</h4>
 <form class="form-horizontal">
   <div class="control-group error">