]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
add card grid sizing
authorMark Otto <markdotto@gmail.com>
Thu, 23 Apr 2015 08:33:19 +0000 (01:33 -0700)
committerMark Otto <markdotto@gmail.com>
Thu, 23 Apr 2015 08:33:19 +0000 (01:33 -0700)
docs/components/card.md

index d8a356f6a6711a65773df8b746e2b1957d307612..715c5eb3e58bcc034055ee380d2595a176596352 100644 (file)
@@ -19,6 +19,37 @@ Cards require very little markup, but do require some additional classes to give
 </div>
 {% endexample %}
 
+### Sizing
+
+Cards are block-leve by default, so they'll fill the available horizontal space. Constrain their widths via custom styles, our predefined grid classes, or our grid mixins.
+
+{% example html %}
+<div class="card" style="width: 20rem;">
+  <h3 class="card-title">Special title treatment</h3>
+  <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
+  <a href="#" class="btn btn-primary">Go somewhere</a>
+</div>
+{% endexample %}
+
+{% example html %}
+<div class="row">
+  <div class="col-sm-6">
+    <div class="card">
+      <h3 class="card-title">Special title treatment</h3>
+      <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
+      <a href="#" class="btn btn-primary">Go somewhere</a>
+    </div>
+  </div>
+  <div class="col-sm-6">
+    <div class="card">
+      <h3 class="card-title">Special title treatment</h3>
+      <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
+      <a href="#" class="btn btn-primary">Go somewhere</a>
+    </div>
+  </div>
+</div>
+{% endexample %}
+
 ### Text alignment
 
 You can quickly change the text alignment of any card—in its entirety or specific parts—with our [text align classes]().