Im trying to create a hover state on my images that darken the images using bootstap
Although instead of covering the whole image including the white border I want it to remain within the white padding.
I cant seem to the position right. As soon as I add heights and percentages the over states don't remain in place when responding to screen width. They become pushed out over the image.
Can anyone assist?
here is the code
FIDDLE
You need to change your
.caption
class- it's currently using a percentage value to calculate padding, which makes ascertaining the element size based on this difficult. Change it to a pixel value then offset the element top, right, bottom, left by the same amount (-1px to compensate for your border). This will mean all your thumbnails have a consistent white border, and removes any percentage based sizing artefacts.