xxxxxxxxxx
1
<div class="container my-4">
2
3
<p class="font-weight-bold">To center the content horizontally add <code>.text-center</code> class to the parent element of the content.</p>
4
5
<p><strong>Detailed documentation and more examples you can find in our <a href="https://mdbootstrap.com/docs/jquery/utilities/text/#text-alignment"
6
target="_blank">Bootstrap Text Alignment Docs</a>.</p>
7
8
<p><Strong>Note: </Strong>Grey border marks the parent element of the image.</p>
9
10
<hr>
11
12
<p><strong>Add <code>.text-center</code> class to the parent element of the content to center it
13
horizontally.</strong></p>
14
15
<div class="text-center border border-light p-5">
16
17
<img src="https://mdbootstrap.com/img/Photos/Avatars/img%20(10).jpg" class="img-fluid mb-4" alt="">
18
19
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Recusandae laborum alias rem eius ipsum saepe dolores impedit vero dignissimos, aperiam tenetur iste odio deserunt ex eos nam quae minima modi.</p>
20
21
<button type="button" class="btn btn-primary">Primary</button>
22
<button type="button" class="btn btn-danger">Danger</button>
23
24
</div>
25
26
</div>
1
1
1
1
Console errors: 0