title: Padding change the layout two div side by side
body: <p>I want to make div side by side , I can achieve this but when I add som margin or padding they can disturb the lay out, I just want that two div display side by side with padding and margin property.</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>#center{
       
       width:100%;
       border:1px solid gray; 
       overflow:hidden;
       display:inline-block;
       }
      #leftdiv{
      height:200px;
      width:50%;
      background-color:gray;
      float:left;
      margin:2px;
      } 
      
      #rightdiv{
      height:200px;
      width:50%;
      background-color:yellow;
      float:left;
      margin:2px;
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="center"&gt;
      
      &lt;div id="leftdiv"&gt;&lt;/div&gt;
      &lt;div id="rightdiv"&gt;&lt;/div&gt;
      
      &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>