How to add an overlay on my image?
I used :after
property but it's not working. I used it before it's worked but this time it's not working. I think I made some mistake but I can't find that. Can anyone give me a solution?
Github Link: https://iamtheasad.github.io/Bino-l-p/
Codepen Link: https://codepen.io/aasaadzaman5/pen/PowxrVp
.team_list img {
border-radius: 50%;
border: 4px solid #e74c3c;
z-index: 1;
position: relative;
-webkit-box-shadow: 0px 1px 6px 1px #000;
box-shadow: 0px 1px 6px 1px #000;
}
.team_list img:after {
position: absolute;
content: '';
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: red;
}
Html:
<div class="team_list">
<span>
<img src="images/team/team_1.jpg" alt="Team Person" />
<h4>Kazi Erfan</h4>
<p>UI/UX Designer</p>
</span>
<span>
<img src="images/team/team_2.jpg" alt="Team Person" />
<h4>Kazi Erfan</h4>
<p>UI/UX Designer</p>
</span>
<span>
<img src="images/team/team_3.jpg" alt="Team Person" />
<h4>Kazi Erfan</h4>
<p>UI/UX Designer</p>
</span>
<span>
<img src="images/team/team_4.jpg" alt="Team Person" />
<h4>Kazi Erfan</h4>
<p>UI/UX Designer</p>
</span>
<span>
<img src="images/team/team_5.jpg" alt="Team Person" />
<h4>Kazi Erfan</h4>
<p>UI/UX Designer</p>
</span>
</div>