title: How to place cover div onto object fit images in responsive flex container?
body: <p>Here is my demo to show what I mean:     </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>* {
    box-sizing: border-box;
  }
  
  body, html {
    height: 100%;
    width: 100%;
  }
  
  body {
    background: #333;
    margin: 0;
    padding: 0;
  }
  
  .content {
    display: flex;
    height: 100%;
    padding: 20px;
  }
  
  .panel {
    flex: 0 0 200px;
    display: flex;
    margin-left: 20px;
  }
  
  .widget {
    background: white;
    width: 100%;
    height: 100%;
  }
  
  .videoContainer {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
   }
  
  .video {
    height: 50%;
    width: 50%;
    padding: 2px;
    position: relative;
  }
  
  .videoCover {
    position: absolute;
    background: red;
    opacity: 0.4;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Default for videos */
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="content"&gt;
    &lt;div class="videoContainer"&gt;
      &lt;div class="video"&gt;
        &lt;div class="videoCover"&gt;&lt;/div&gt;
        &lt;img width="600" height="400" src="http://thatgrapejuice.net/wp-content/uploads/2016/03/rihanna-thatgrapejuice-mariah-carey-billboard-600x400.jpg"&gt;
      &lt;/div&gt;
  
      &lt;div class="video"&gt;
        &lt;img width="600" height="400" src="http://www.radioandmusic.com/sites/www.radioandmusic.com/files/images/entertainment/2015/09/28/rihanna-%2812%29.jpg"&gt;
      &lt;/div&gt;
  
      &lt;div class="video"&gt;
        &lt;img width="600" height="400" src="http://m.buro247.com.au/thumb/600x960_0/images/640-rihanna-charity1.jpg"&gt;
      &lt;/div&gt;
  
       &lt;div class="video"&gt;
        &lt;img width="600" height="400" src="http://hjb.hu/wp-content/uploads/2014/02/rihanna2.jpg"&gt;
      &lt;/div&gt; 
    &lt;/div&gt;
    
    &lt;div class="panel"&gt;
      &lt;div class="widget"&gt;&lt;/div&gt;
    &lt;/div&gt;
    
  &lt;/div&gt;  </code></pre>
  </div>
  </div>
  </p>
  
  <p>Resizing the browser vertically or horizontally, the problem can be seen clearly. So basically I would like to place the red cover exactly onto the images. So I assume I need a div, which is exactly the same size as the image. 
  It seems object fit does its job well, but because of this, I cannot place over the red div.</p>
  
  <p>Is it can be done pure css? How should I modify the dom and the css?
  Thank you very much!</p>
  
  <p>Clarifying what I would like to achive is:</p>
  
  <p><a href="https://i.stack.imgur.com/oweIk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oweIk.png" alt="enter image description here"></a> </p>
  
  <p><a href="https://i.stack.imgur.com/AhCKk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AhCKk.png" alt="enter image description here"></a></p>