@ElvislexSubmitted about 1 year ago
i don't know how to add color to the image. i will very grateful if someone can put me through that. thanks.
i don't know how to add color to the image. i will very grateful if someone can put me through that. thanks.
Hey, Elvis perhaps you could nest another div within your card-img div and name it with a class of "overlay". Then put this div directly before your img tags so that it sits on top, then you can target it in CSS with hsla. The a is for the alpha channel which controls your opacity.
.overlay { position: absolute; width: 100%; height: 100%; background: hsla(277, 64%, 61%, 0.5)
setting the alpha channel to 0.5 gives you 50% opacity, this is what I did to get my image colored the correct way however I'm still new so there could be another better way. Hopefully, this helps.