0

I want to wrap a group of rows in bootstrap while still having everything in one container. Are there any rules/conventions about this regarding bootstrap?

I put a fiddle below of what i want to do, but i am not sure if this is the right method.

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
  <div class="extraDiv" id="topdiv">
    <div class="row">
      <div class="col-md-12">Bla</div>
    </div>
    <div class="row">
      <div class="col-md-6">Bla</div>
      <div class="col-md-6">Bla</div>
    </div>
  </div>
  <div class="extraDiv" id="bottomdiv">
    <div class="row">
      <div class="col-md-12">Bla</div>
    </div>
  </div>
</div>
user4493177
  • 750
  • 11
  • 32

2 Answers2

1

As far my understanding it is totally okay the way you use .row class in a .container class. For further understanding you can check this link Must Bootstrap container elements include row elements?

Community
  • 1
  • 1
Husain Ahmmed
  • 351
  • 2
  • 7
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/13659655) – Anselm Sep 13 '16 at 13:41
  • Thanks. I will try to follow your suggestion – Husain Ahmmed Sep 13 '16 at 13:49
1

Seems fine - though it depends what you want to do with the gutters etc.

Generally you just want one .container wrapping the whole page (to give you the main central column), and within that you can nest as many rows/cols as you need to.

Matt Wilson
  • 8,159
  • 8
  • 33
  • 55