title: Bootstrap .container-fluid overflow
body: <p>I have look for lots of solutions for this in StackOverflow but none solved it, so I hope someone could helo me directly in this post.</p>
  
  <p>I'm making a simple navegation bar for a web page and I wanted it to full fill the width of the browser window, so I gave it the class .container-fluid, and it worked perfectly in a big computer, but when using a laptop, the elements inside the .container-fluid overflows the window like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Gt0eK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gt0eK.png" alt="enter image description here"></a></p>
  
  <p>A better look at it is this:</p>
  
  <p><a href="https://i.stack.imgur.com/mB2G2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mB2G2.png" alt="enter image description here"></a></p>
  
  <p>Why is this happening?</p>
  
  <p>Here is the code:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&gt;
  
          &lt;title&gt;__codekup__&lt;/title&gt;
  
          &lt;!-- Bootstrap --&gt;
          &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"
              integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
              crossorigin="anonymous" /&gt;
  
          &lt;link rel="stylesheet" href="main.css" type="text/css" /&gt;
      &lt;/head&gt;
      &lt;body&gt;
  
          &lt;div class="header container-fluid"&gt;
              &lt;div class="row align-items-center justify-content-between"&gt;
                  &lt;div class="col-sm-2 text-center"&gt;
                      &lt;h1&gt;Pliki&lt;/h1&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-2"&gt;
                      &lt;div class="row align-items-center"&gt;
                          &lt;div class="col-sm-6 text-center"&gt;
                              Instructions
                          &lt;/div&gt;
                          &lt;div class="col-sm-6 text-center"&gt;
                              &lt;button type="button" class="btn btn-outline-primary pull-right"&gt;
                                  Download Game
                              &lt;/button&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="main"&gt;&lt;/div&gt;
  
          &lt;!-- Bootstrap dependencies and jQuery library --&gt;
          &lt;script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"
              integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n"
              crossorigin="anonymous"&gt;&lt;/script&gt;
          &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"
              integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb"
              crossorigin="anonymous"&gt;&lt;/script&gt;
          &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"
              integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn"
              crossorigin="anonymous"&gt;&lt;/script&gt;
  
          &lt;script src="main.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>SASS</p>
  
  <pre><code>@import url('https://fonts.googleapis.com/css?family=Lato');
  
  $primary-color: rgb(118, 200, 136);
  $bg-color: rgb(33, 37, 43);
  
  .header {
      background-color: $bg-color;
      height: 70px;
      color: $primary-color;
  
      .row {
          height: 100%;
      }
  
      h1 {
          font-family: Courier, sans-serif;
      }
  
      .btn {
          color: $primary-color;
          border-color: $primary-color;
          font-family: Lato, sans-serif;
  
          &amp;:hover {
              color: $bg-color;
              background-color: $primary-color;
          }
      }
  }
  
  .main {
      background: black;
  }
  </code></pre>
  
  <p>JAVASCRIPT</p>
  
  <pre><code>$(document).ready(function () {
      var h = window.innerHeight;
      $('.main').css('height', h + 'px');
  });
  </code></pre>