The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › DIV border behind an image?
Tried using z-index to put the border behind the image but it makes the text inside the div unselectable. Here’s an example:
https://jsfiddle.net/f391Lcmh/
Is there anyway to do this better?
I got the solution over on Reddit:
https://www.reddit.com/r/css/comments/4kpnut/div_border_behind_an_image/
Just needed to up the img z-index instead of the text div and added the position: relative to the img css. That made it work great!