title: Use Grid / Row in Modal
body: <p>I'm trying to work with the Bootstrap 3 grid system and I'm running in to issues / confusion when using it with Modals.</p>
  
  <p>Basically what I see is when I add rows to the modal body the content often spills out of the modal body.  So what is the best way to make the modal body have its own "container" so it has its own grid.  I'm already using .container on the main part of my page and I've read you should not nest .container or .container-fluid.</p>
  
  <p>What I'm looking for are some best practices or an explanation for why I'm seeing some unexpected rendering.</p>
  
  <p>Should I do this:   </p>
  
  <pre><code>&lt;div class="modal-body row"&gt;
      ...
  &lt;/div&gt;
  </code></pre>
  
  <p>or this:   </p>
  
  <pre><code>&lt;div class="modal-body"&gt;
    &lt;div class="row"&gt;
      ....
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>or this:   </p>
  
  <pre><code>&lt;div class="modal-body"&gt;
    &lt;div class="col-xs-12"&gt;
      ....
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here's a contrived example: (<a href="http://plnkr.co/edit/5vOppLmuRBqH3RAHfynT" rel="nofollow">http://plnkr.co/edit/5vOppLmuRBqH3RAHfynT</a>)</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;script data-require="jquery@*" data-semver="2.1.3" src="https://code.jquery.com/jquery-2.1.3.min.js"&gt;&lt;/script&gt;
    &lt;link data-require="bootstrap@*" data-semver="3.3.1" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" /&gt;
    &lt;link data-require="bootstrap-css@*" data-semver="3.3.1" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" /&gt;
    &lt;script data-require="bootstrap@*" data-semver="3.3.1" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"&gt;&lt;/script&gt;
    &lt;link rel="stylesheet" href="style.css" /&gt;
    &lt;script src="script.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;header class="container"&gt;
      &lt;div class="row"&gt;
        &lt;h1 class="text-center"&gt;This is the Header&lt;/h1&gt;
      &lt;/div&gt;
      &lt;p class="col-xs-3"&gt;Header Info Right&lt;/p&gt;
      &lt;p class="col-xs-9"&gt;Header Info Left&lt;/p&gt;
    &lt;/header&gt;
    &lt;section class="container"&gt;
      &lt;div class="row"&gt;
        &lt;div class="col-xs-3"&gt;
          &lt;ul&gt;
            &lt;li&gt;Col1&lt;/li&gt;
            &lt;li&gt;Col1&lt;/li&gt;
          &lt;/ul&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-xs-2 col-xs-offset-4"&gt;
              &lt;button type="button" class="btn btn-primary btn-sm pull-left" data-toggle="modal" data-target="#modal1"&gt;
                &lt;span class="glyphicon glyphicon-new-window"&gt;&lt;/span&gt;
              &lt;/button&gt;
              &lt;!-- Modal --&gt;
              &lt;div class="modal fade" id="modal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
                &lt;div class="modal-dialog modal-sm"&gt;
                  &lt;div class="modal-content"&gt;
                    &lt;div class="modal-header"&gt;
                      &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
                      &lt;/button&gt;
                      &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
                    &lt;/div&gt;
                    &lt;div class="modal-body"&gt;
                      &lt;div class="col-xs-12"&gt;
                        &lt;hr/&gt;
                        &lt;hr/&gt;
                        &lt;div class="row"&gt;
                          &lt;h1 class="text-center"&gt;Modal for Col 1&lt;/h1&gt;
                        &lt;/div&gt;
                        &lt;hr/&gt;
                        &lt;div class="row"&gt;
                          &lt;div class="col-xs-3"&gt;
                            &lt;ul&gt;
                              &lt;li&gt;Modal Col1&lt;/li&gt;
                              &lt;li&gt;Modal Col1&lt;/li&gt;
                            &lt;/ul&gt;
                          &lt;/div&gt;
                          &lt;div class="col-xs-6"&gt;
                            &lt;ul&gt;
                              &lt;li&gt;Modal Col2&lt;/li&gt;
                              &lt;li&gt;Modal Col2&lt;/li&gt;
                            &lt;/ul&gt;
                          &lt;/div&gt;
                          &lt;div class="col-xs-3"&gt;
                            &lt;div class="row"&gt;
                              &lt;ul&gt;
                                &lt;li&gt;Modal Col3&lt;/li&gt;
                                &lt;li&gt;Modal Col3&lt;/li&gt;
                              &lt;/ul&gt;
                            &lt;/div&gt;
                          &lt;/div&gt;
                        &lt;/div&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="modal-footer"&gt;
                      &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-6"&gt;
          &lt;ul&gt;
            &lt;li&gt;Col2&lt;/li&gt;
            &lt;li&gt;Col2&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-3"&gt;
          &lt;ul&gt;
            &lt;li&gt;Col3&lt;/li&gt;
            &lt;li&gt;Col3&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/section&gt;
    &lt;footer class="container"&gt;
      &lt;div class="row"&gt;
        &lt;hr/&gt;
        &lt;p class="col-xs-6"&gt;Footer Info Right&lt;/p&gt;
        &lt;p class="col-xs-6"&gt;Footer Info Left&lt;/p&gt;
      &lt;/div&gt;
    &lt;/footer&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>