M
M
Michael R.2017-09-17 13:45:41
css
Michael R., 2017-09-17 13:45:41

Is page center alignment correct (Bootstrap 4)?

Hello!
Task: display any element in the center of the page with a certain width of this element (Bootstrap 4).
Decided like this:

<div class="container-fluid h-100">
    <div class="row align-items-center h-100">
        <div class="col-sm-12">
            <div class="row justify-content-center">
                <div class="col-4 text-center"> // элемент, и его ширина == col-4

                    // content

                </div>
            </div>
        </div>
    </div>
</div>

Question: Is the layout correct for the task at hand? If not, I would be grateful for illustrative examples!
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2017-11-11
@initrd0

I do not know where you found in .justify-content-centerthe .text-centerfourth version.
Works.text-xs-center

V
Vkok, 2019-12-07
@boch112

even i would say just text-center

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question