I am looking to vertically center a hover text overlay, that is responsive. I've tried the
position:absolute
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
styling. This centers the top left of the div with the text overlay, but not the text itself.
Here is a jsfiddle: https://jsfiddle.net/q29edzLx/
Is there a way to use transform with top/left to center the text itself?
I did reference How to center an element horizontally and vertically?, but I could not get other methods, like vertical-align to work.
Many thanks--