title: Why developers use ::before pseudo element with display:table on parent divs
body: <p>I saw that on most websites people often use on parent <code>&lt;div&gt;</code>s <code>::before</code> pseudo with <code>content:'';</code> <em>(i know that you need to put the content)</em> and <code>display: table</code> and I can't figure out why.</p>
  
  <p><img src="https://i.stack.imgur.com/OIwQZ.png" alt="image1"></p>
  
  <p>and</p>
  
  <p><img src="https://i.stack.imgur.com/3TRAs.png" alt="image2"></p>