I have an issue with a container on 100% height not working on Chrome. In short, it's a caption from an image which is appearing over the image while hovering it.
.item {
position: relative;
}
.caption {
width: 100%;
height: 100%;
position: absolute;
background-color: rgba(0, 0, 0, 0.6);
display: table;
top: 0;
left: 0;
box-sizing: border-box;
border-radius: 4px;
opacity: 0;
transition: 0.2s;
}
a:hover .caption {
opacity: 1;
transition: 0.2s;
}
.caption .caption-inter {
display: table-cell;
vertical-align: middle;
}
.item img {
width: 100%;
}
<div class="item">
<a href="#blabla">
<img src="//i.stack.imgur.com/tiQ1S.jpg">
<div class="caption">
<span class="caption-inter">caption of the image</span>
</div>
</a>
</div>
It works on Firefox, IE, but for Chrome, the caption with background only appear at the top of the image.
Any idea how I could make it work in Chrome?