@TarasKovtynovuch

Почему не стоит по центру в Bootstrap 4?

Почему не стоит по центру в Bootstrap 4?
5efe75c0dd361201003453.png
<div class="container mb-5">
    <div class="row justify-content-center">
      <div class="col">
        <img src="img/otis.png" class="img-fluid" alt="otis" width="200px" style="margin-top: 250px;"><br>
        <img src="img/schindler.png" class="img-fluid" alt="schindler" width="200px" style="margin-top: 300px;">
      </div>
      <div class="col">
        <h1 id="Brands">Brands we work with</h1>
      </div>
      <div class="col">
        <img src="img/kone.png" class="img-fluid" alt="otis" width="200px" style="margin-top: 250px;"><br>
        <img src="img/Thyssenkrupp.png" class="img-fluid" alt="schindler" width="200px" style="margin-top: 300px;">
      </div>
    </div>
  </div>


#Brands{
	font-size: 50px;
	font-family: Gilroy Black;
	writing-mode: vertical-lr;
	transform: scale(-1);
	margin-top: 280px;
}
  • Вопрос задан
  • 70 просмотров
Решения вопроса 1
@cheeroque
Класс justify-content-center у строки ничего не даст, потому что применяется только непосредственно к колонкам, а у них бутстрапом ширина и так жёстко определена.

Если нужно текст выровнять по горизонтали, попробуйте добавить .d-flex.justify-content-center к нужной колонке:

<div class="col d-flex justify-content-center">
  <h1 id="Brands">Brands we work with</h1>
</div>
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы