title: DIVs are not obeying CSS rules. Any ideas?
body: <p>I'm trying to get this layout in the picture but looks like the DIV tags are not obeying the CSS rules.
  I think the issue is because I'm trying to set them in percentage. I need this layout to follow screen size. I don't want any scroller showing. Also if I turn the monitor sideways, it will still obey the layout.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#one {
    height: 20%;
    width: 45%;
    background-color: #66F;
    float: left;
  }
  
  #two {
    background-color: #FC3;
    height: 40%;
    width: 45%;
    float: right;
  }
  
  #three {
    background-color: #0CC;
    float: left;
    height: 20%;
    width: 45%;
  }
  
  #four {
    background-color: #CF3;
    height: 10%;
    width: 80%;
    float: left;
    margin-right: 10%;
    margin-left: 10%;
  }
  
  #five {
    background-color: #F06;
    float: left;
    height: 40%;
    width: 45%;
  }
  
  #six {
    background-color: #9C0;
    float: right;
    height: 20%;
    width: 45%;
  }
  
  #seven {
    background-color: #3FF;
    float: right;
    height: 20%;
    width: 45%;
  }
  
  #eight {
    background-color: #396;
    height: 10%;
    width: 80%;
    margin-right: 10%;
    margin-left: 10%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
    &lt;div id="one"&gt;one&lt;/div&gt;
    &lt;div id="two"&gt;two&lt;/div&gt;
    &lt;div id="three"&gt;three&lt;/div&gt;
    &lt;div id="four"&gt;four&lt;/div&gt;
    &lt;br&gt;
    &lt;div id="five"&gt;five&lt;/div&gt;
    &lt;div id="six"&gt;Six&lt;/div&gt;
    &lt;div id="seven"&gt;Seven&lt;/div&gt;
    &lt;div id="eight"&gt;Content for id "eight" Goes Here&lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help?</p>
  
  <p><a href="https://i.stack.imgur.com/QM4c8.jpg" rel="nofollow noreferrer">Layout Image</a></p>