title: CSS width properties not working correctly
body: <p>I write a html page containing a header on top, following by a section part and an aside part, and then a footer part, and write some CSS codes for styling. here is the html and CSS code:</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>body{
      width: 80%;
      margin: 0 auto;
      background-color: peachpuff;
  }
  
  
  header, section, aside, footer, article{
      margin: 10px;
      padding: 10px;
      text-align: center;
      background-color: aliceblue;
      border: 1px solid cadetblue;
      font-size: 2rem;
      width: 100%;
      box-sizing: border-box;
  }
  header&gt;h1{
  
      height: 100px;
      font-size: 2.5rem;
      text-shadow: 2px 2px 2px red;
  }
  article {
      width: 85%;
      margin: 0 auto;
  }
  section{
      width: 60%;
      height: 300px;
      margin-right:3px;
  display: inline-block;
      /*float:left;*/
  }
  
  aside{
      width: 37%;
      margin-left:3px;
      height: 300px;
      float: right;
      display: inline-block;
  }
  
  footer{
      display: block;
      width: 100%;
      background-color: aliceblue;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Title&lt;/title&gt;
      &lt;link rel="stylesheet" href="main.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;header&gt;
      &lt;h1&gt;This is header.&lt;/h1&gt;
  &lt;/header&gt;
  
  &lt;section&gt;
      this is section.
      &lt;article&gt;this is article.&lt;/article&gt;
  &lt;/section&gt;
  
  &lt;aside&gt;aside part.&lt;/aside&gt;
  
  &lt;footer&gt;this is footer.&lt;/footer&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I set <strong>width:100%</strong> for header and footer, and it should make then to stretch so fill all the body width, as body is their parent node. but I notice that it cause header and footer that go beyond the body width at right side! if I comment that, every thing will be fine, but why it doesn't work as expected?</p>
  
  <p>and second question, I want section and aside to be located next to each other, and by setting <strong>float:right;</strong> for aside tag they are, but if I set <strong>float:left;</strong> for section element too, while they still are next to each other, footer become their background too! why that happens?</p>
  
  <p>thanks.</p>