I am trying to vertically center some text in a responsive div. I was not able to figure it out. I would appreciate if I can get some help.
Thank you.
<style>
.thumb {
float: left;
margin: 0px;
padding: 0px;
position:absolute;
height:100%;
width:100%;
}
.thumb img {
width: 100%;
padding: 0;
}
.thumb > div {
background-color: rgba(0,0,0,0.1);
opacity: 0;
position: absolute;
top:0;
bottom:0;
left:0;
right:0;
}
.thumb:hover > div {
display: block;
opacity: 1.0;
}
.thumb > div div {
}
#text {
vertical-align: middle;
position: relative;
z-index: 2;
display: inline-block;
}
</style>