title: How apply padding in HTML without increasing the div size?
body: <p>I want to apply some padding in a div, but when the padding property is applied, the div size increases because the padding size is added to the div.</p>
  
  <pre><code>&lt;div id="someDiv"&gt;
      someContent
  &lt;/div&gt;
  
  #someDiv{
      padding: 1em;
  }
  </code></pre>
  
  <p>There is some way to apply the padding without increasing the div size? I have one solution that includes adding another with the content div inside the #someDiv and applying margin to it, but I don't know if this is the best solution.</p>
  
  <p>Something like this:</p>
  
  <pre><code>&lt;div id="someDiv"&gt;
      &lt;div idi="anotherDiv"&gt;
          someContent
      &lt;/div&gt;
  &lt;/div&gt;
  
  #anotherDiv{
      margin: 1em;
  }
  </code></pre>