]> git.ipfire.org Git - ipfire.org.git/blame - src/scss/bootstrap-4.0.0-alpha.6/docs/content/figures.md
Introduce autotools
[ipfire.org.git] / src / scss / bootstrap-4.0.0-alpha.6 / docs / content / figures.md
CommitLineData
91e44d91
S
1---
2layout: docs
3title: Figures
4description: Documentation and examples for displaying related images and text with the figure component in Bootstrap.
5group: content
6---
7
8Anytime you need to display a piece of content—like an image with an optional caption, consider using a `<figure>`.
9
10Use the included `.figure` , `.figure-img` and `.figure-caption` classes to provide some baseline styles for the HTML5 `<figure>` and `<figcaption>` elements. Images in figures have no explicit size, so be sure to add the `.img-fluid` class to your `<img>` to make it responsive.
11
12{% example html %}
13<figure class="figure">
14 <img data-src="holder.js/400x300" class="figure-img img-fluid rounded" alt="A generic square placeholder image with rounded corners in a figure.">
15 <figcaption class="figure-caption">A caption for the above image.</figcaption>
16</figure>
17{% endexample %}
18
19Aligning the figure's caption is easy with our [text utilities]({{ site.baseurl }}/utilities/typography/#text-alignment).
20
21{% example html %}
22<figure class="figure">
23 <img data-src="holder.js/400x300" class="figure-img img-fluid rounded" alt="A generic square placeholder image with rounded corners in a figure.">
24 <figcaption class="figure-caption text-right">A caption for the above image.</figcaption>
25</figure>
26{% endexample %}