Why the shadow of the block is not visible because the pictures in the previous unit?

The challenge is that when you hover over the block (top block with a picture on the bottom white background with text) have a stripe on the bottom of the picture. Thought to implement this with a border, but then "jumps" the block. Tried the shadow (up) from the text block, but somehow it is not visible

<div class="cours">
 <a href="#" class="cours_press">
 <div class="cours_img">
 <img src="#" alt> 
</div>
 <div class="cours_txt">
the <h3>a Course</h3>
 <p>course Description</p>
 </div> 
</a>
</div>


.cours {
 display: block;
 width: 300px;
 box-sizing: border-box;
}

.cours_img {
 height: 170px;
 overflow: hidden;
}
.cours_img img {
 width: 100%;
 height: auto;
}
.cours_txt {
 padding: 20px;
 background-color: #fff;
}
.cours_press:hover .cours_txt {
 box-shadow: 0-5px 0 0 #8cc34b;
}
July 9th 19 at 13:39
2 answers
July 9th 19 at 13:41
Solution
Everything decided.
added to .cours_img { display: block; box-sizing: border-box;}
border and earned, not pushing the block
.cours_img {
 display: block;
 height: 170px;
 overflow: hidden;
 box-sizing: border-box;
}
.
.
.cours_press:hover .cours_img {
 border-bottom: 5px solid #8cc34b;
}
July 9th 19 at 13:43
it overlaps another block, make a margin the size of a shadow
And what it covers? course_txt? Or not? To be honest, I can't even imagine and understand how and to whom to prescribe the margin to make it work... - Dortha_Hans commented on July 9th 19 at 13:46
: Unit shadow margin-top:5px; - Henderson_Beat commented on July 9th 19 at 13:49
Nah. Well, it's not going to work as it should. Then when you hover lane will not appear in the picture, and under it, and the block with the text will still jump about 5 pixels as a border.

The problem is that when you hover there is a strip which covers a 5px image below. And main unit respectively, is not extendible. If doing the inner shadow in course_txt the block not leaving, but this option is not suitable as the strip closes the white box of the text field, and have a picture. Here is the problem - Dortha_Hans commented on July 9th 19 at 13:52
: then z-index - Henderson_Beat commented on July 9th 19 at 13:55

Find more questions by tags CSSHTML