A
A
anna_makeenko2020-08-18 08:26:36
HTML
anna_makeenko, 2020-08-18 08:26:36

How to properly use bootstrap 4/5 columns?

I look at the examples of bootstrap 4 templates and see that in some places rows / columns are used, and in others simple blocks with classes for indents.

https://getbootstrap.com/docs/4.5/examples/pricing/

For example, there is such a layout:

<div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="mt-5 text-center">
                    <p class="h4">...</p>
                </div>
            </div>
        </div>
    </div>


Do I understand correctly that in this case it is not necessary to use the row/col-md* classes and should just be done like this?

<div class="container">
        <div class="mt-5 text-center">
            <p class="h4">...</p>
        </div>
    </div>


When should row/col-md* be used?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sHARek, 2020-08-18
@sHARek

google chrome - Control + Shift + C further on the picture:
5f3b732d632c7676183146.jpeg
And test md, dd and damn it as much as you like.

A
archelon, 2020-08-18
@archelon

of course, there is no point in fencing this row and col construction for a simple block.
and this wrapper <div class="mt-5 text-center">is also completely unnecessary

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question