From: Mark Otto Date: Thu, 23 Jan 2014 03:15:17 +0000 (-0600) Subject: Fixes #12344: Update docs to show workaround for using button element with justified... X-Git-Tag: v3.1.0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b24a3b99c74d9bcace9fcb18aee81356d484fcc;p=thirdparty%2Fbootstrap.git Fixes #12344: Update docs to show workaround for using button element with justified button groups --- diff --git a/docs/components.html b/docs/components.html index 510abcc667..aab22cfd89 100644 --- a/docs/components.html +++ b/docs/components.html @@ -363,19 +363,16 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns, {% endhighlight %} -

Justified link variation

-

Make a group of buttons stretch at the same size to span the entire width of its parent. Also works with button dropdowns within the button group.

+

Justified button groups

+

Make a group of buttons stretch at equal sizes to span the entire width of its parent. Also works with button dropdowns within the button group.

Handling borders

Due to the specific HTML and CSS used to justify buttons (namely display: table-cell), the borders between them are doubled. In regular button groups, margin-left: -1px is used to stack the borders instead of removing them. However, margin doesn't work with display: table-cell. As a result, depending on your customizations to Bootstrap, you may wish to remove or re-color the borders.

-
-

Element-specific usage

-

This only works with <a> elements as the <button> doesn't pick up the styles we use to justify content (some display: table-cell;-fu).

-
- +

With <a> elements

+

Just wrap a series of .btns in .btn-group.btn-group-justified.

Left @@ -404,6 +401,35 @@ lead: "Over a dozen reusable components built to provide iconography, dropdowns,
...
+{% endhighlight %} + +

With <button> elements

+

To use justified button groups with <button> elements, you must wrap each button in a button group. Most browsers don't properly apply our CSS for justification to <button> elements, but since we support button dropdowns, we can workaround that.

+
+
+
+ +
+
+ +
+
+ +
+
+
+{% highlight html %} +
+
+ +
+
+ +
+
+ +
+
{% endhighlight %}