Commit fe675648 authored by Mark Otto's avatar Mark Otto

add card grid sizing

parent 37e54375
...@@ -19,6 +19,37 @@ Cards require very little markup, but do require some additional classes to give ...@@ -19,6 +19,37 @@ Cards require very little markup, but do require some additional classes to give
</div> </div>
{% endexample %} {% 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 ### Text alignment
You can quickly change the text alignment of any card—in its entirety or specific parts—with our [text align classes](). You can quickly change the text alignment of any card—in its entirety or specific parts—with our [text align classes]().
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment