I am trying to make an image darken and show some text on the darkened image when hovered.
I got an example code from StackOverflow:
I tried to do the exact same thing with my image, but when I did it, there is this extra blue background color exceeding the bottom of the red flower image (and the example image also):
My questions are:
-
Why is this happening?
-
Any idea on how to fix this?
-
Also, if I want to move the text on the image, is that done by modifying the padding of the image description element?