My question may be simple, but I'm struggling to find the solution.
I have a slider with an image in the middle and want to display some text alongside it like this: https://i.sstatic.net/v2Rck.jpg
However, I can't seem to get the text to align vertically with the image. Here is the CSS code I'm using:
.caption {
position: absolute;
height: auto;
text-align: center;
zoom: 1;
color: white;
display:table;
left:20%;
width: 60%;
margin-top: auto;
margin-bottom: auto;
padding: 10px 0;
background:rgba(138, 138, 138, 0.55);
}
Could someone please point out what I might be doing wrong?