D
D
Dima2018-03-29 19:35:49
Bootstrap
Dima, 2018-03-29 19:35:49

In Bootstrap 4 vertical alignment (align-items) to the center does not work, why?

I did not find an answer to this question, here is the code

<div class="container">
  <div class="form__submit d-flex align-items-center">
    <a href="#" class="btn-lg btn btn-primary">Отправить</a>
    <p>Нажимая кнопку «Отправить», вы соглашаетесь с <a href="#">политикой обработки персональных данных</a></p>
  </div>
</div>

The button is still aligned to the top border (flex-start). What can be wrong? Code in the sandbox .
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2018-03-29
@KickeRockK

Well, you have a parent element (.form_submit) with a height of 64 pixels - a button in the center. Make it taller and you'll see.
In this case, flex start and center are approximately equal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question