Col-Md=xx bootstrap

Asked

Viewed 179 times

0

my doubt today is as follows:

I can put a larger col-Md inside a smaller one?

For example:

            <div class="col-md-6 ">
                <div class="col-md-12">
                    <p> Texto aqui</p>
                </div>
            </div>

My logic is: The second div would occupy 100% of the first. I just want to know if I’m right.

  • 1

    correct, col-Md-6 uses 50% of the space while col-Md-12 is 100%. its second div would have the size of the first.

1 answer

5


Yes, but there must be another line between them:

<div class="row">
    <div class="col-md-6">
        <div class="row">
            <div class="col-md-8">.col-md-8</div>
            <div class="col-md-4">.col-md-4</div>
        </div>
    </div>
    <div class="col-md-6">
        <div class="row">
            <div class="col-md-3">.col-md-3</div>
            <div class="col-md-9">.col-md-9</div>
        </div>
    </div>
</div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.