2
Hello, I’m creating a bootstrap 4 site. By trying to center a section of my site vertically, it just doesn’t work. I tried to use several ways to center the text (flexbox, custom css, ...), but nothing seems to work. The code I used was as follows:
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-4 col-xl-4">
<img src="images/school-portugal.png" width="100%" height="100%"/>
</div>
<div class="col-sm-12 col-md-12 col-lg-8 col-xl-8 schools-text">
<span class="align-middle">
<h3>Portugal</h3>
<p>Portugal is represented by OFICINA - Escola Profissional do INA, a school located in the north of the country, in the city of Santo Tirso, district of Porto.</p>
</span>
</div>
I’m grateful for any help you can give me.
If what you want is to centralize the
h3
and thep
just add the class text-center bootstrap to the elements or thediv
that contains these elements. Tbm is missing close two Divs in your Html.– LeAndrade
change
<span class="align-middle">
for<span class="text-center">
– Alvaro Alves
the center text the content horizontally and I want to center veticalmente
– MachineTheGod
Take a look at this link
– Alvaro Alves