I have an issue with my CSS and I don't understand why I am not able to create a transition for my overlay element (.afterDim). My overlay is working, however I don't find how to make the transition between the two states. I tried to play with my classes but nothing seems to work, I am a little bit lost and I need your help on this one.
    .dimImgContainer .afterDim {
      position: absolute;
      top: 0;
      left:10px;
      width:calc(100% - 20px); 
      height: 100%;
      display: none;
      color: #FFF;
      -moz-transition: all 0.3s ease-in-out;
      -o-transition: all 0.3s ease-in-out;
      -webkit-transition: all 0.3s ease-in-out;
      transition: all 0.3s ease-in-out; 
    }
    .dimImgContainer:hover > .afterDim {
      display: block;
      background: rgba(0, 0, 0, .6);
    }<div class="hidden-xs col-sm-4 col-md-4 iqitcontent-column iqitcontent-element iqitcontent-element-id-12  banner-column ">
      <a href="https://biospera.com/graines-potageres/"><div class="dimImgContainer">
        <div class="afterDim">Hello there</div>
        <img src="https://biospera.com/img/cms/Homepage/hp-banners/pct/graines-potageres-banner-pct-2.jpg" class="img-responsive banner-image" alt="Grievous">
        <h2 class="headingDevDimPCT">General Kenobi</h2>
      </div></a>
    </div>I have also made a codepen with quite the same code here:
 
     
    