@meistens
Posted
Hey there
For your question on how to overlay, use the pseude elements ::before
and ::after
on the image container.
Below is an example of how to overlay using the pseudo elements I listed above. The before property can be used to set the color, the after property for the eye icon. Doing otherwise means the icon will be hidden behind the color as it will be positioned absolute.
HTML
div class = 'img'
img src = "img-here" alt = "any_text"
</div>
</div>
CSS
.container{
position: relative;
}
.img::before{
background-color: blue;
position: absolute;
.img::after{
background: url(./Image jpg) ;
position: absolute;
Don't mind the messy code though, but other than what was given, you can use the top, left or right property to position it to the center of the container (which is the .container specified)
@nobody1234455
Posted
@meistens I will try it out. Thanks a lot. (y) (y) (y)