S
S
sasha_jarvi2019-08-09 16:14:48
css
sasha_jarvi, 2019-08-09 16:14:48

Is it acceptable to use multiple .containers in one block?

Is it acceptable to use multiple .containers in one block? For example, so

<section class="video-diaries">
    <div class="container"></div>
    <div class="container-fluid"></div>
    <div class="container"></div>
</section>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lord_Dantes, 2019-08-09
@sasha_jarvi

Well, yes, why not. It's just that if there are different sections, I would divide into different sections, and not into one.

V
ViktorWhere, 2019-08-09
@ViktorWhere

A few rules that will make your layout on BS4 easier.
1. container - What is it? This is a regular block with a given fixed width and padding on the left and right respectively. container cannot be in container. That is, the following structure is not correct:

<div class="container">
        <div class="row">
            <div class="col-12">
                <div class="container">
                    Это не правильно!
                </div>
            </div>
        </div>
    </div>

Correctly:
<div class="container">
    <div class="row">
        <div class="col-12">
            Текст
        </div>
    </div>
</div>
<div class="container">
    <div class="row">
        <div class="col-12">
            Текст - 2
        </div>
    </div>
</div>

Just like col cannot be nested in col.
<div class="container">
    <div class="row">
        <div class="col-12">
            <div class="col-5">
                col нельзя вкладывать в col
            </div>
        </div>
    </div>
</div>

Well, row, respectively.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question