CSS pseudo class not working

I'm trying to create a gradient border underneath an image inside a div. I'm 100% sure that my CSS code itself is perfectly fine as I've tested it on other elements before. The problem is that somehow it refuses to select the correct element and place the pseudo element underneath it.