K
K
kamwork2017-01-19 16:59:43
Bootstrap
kamwork, 2017-01-19 16:59:43

How to vertically center a form in bootstrap 4?

There is a code:

<footer class="footer">
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-12 col-sm-5 col-xl-4">
                <span class="text-muted">Shop - интернет магазин</span>
            </div>
            <div class="col-xs-12 col-sm-7 col-xl-8">
                <form class="form-inline float-sm-right">
                    <input class="form-control mr-sm-2" type="email" name="email" placeholder="Введите ваш email">
                    <button class="btn btn-outline-success my-2 my-sm-0" name="subscribe" type="submit">Подписаться
                    </button>
                </form>
            </div>
        </div>
    </div>
</footer>

Tried to set the align-middle class but it doesn't work, even though the form is inline
The text is aligned through the line-height given by the footer

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WhatYouDoing, 2017-03-05
@WhatYouDoing

display: flex;
justify-content: center;
align-items: center;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question