title: Pseudoelement :after changes size of parent div component
body: <p>I’m trying to create gallery like this: </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> .gallery-item{
       overflow: hidden;}
  
       .gallery-item:after{
        content: "text ....";
        position: relative;
        display: block;
        transform: translate(20px, -30px);}
  
       img{
        width: 100%}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/&gt;
  &lt;div class="row"&gt;
          &lt;div class="col-md-4 gallery-item"&gt;
        &lt;img src="https://s-media-cache-ak0.pinimg.com/736x/c2/0b/2a/c20b2a893ad6d1d29764416207c8b885--sahara-marocain-morocco.jpg"&gt;
       &lt;/div&gt; 
       &lt;div class="col-md-4 gallery-item"&gt;
        &lt;img src="https://s-media-cache-ak0.pinimg.com/736x/c2/0b/2a/c20b2a893ad6d1d29764416207c8b885--sahara-marocain-morocco.jpg"&gt;
       &lt;/div&gt; 
       &lt;div class="col-md-4 gallery-item"&gt;
        &lt;img src="https://s-media-cache-ak0.pinimg.com/736x/c2/0b/2a/c20b2a893ad6d1d29764416207c8b885--sahara-marocain-morocco.jpg"&gt;
       &lt;/div&gt; 
      &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I've create :after with some text, but this element changes size of parent .gallery-item. I don't know how to avoid it.</p>