I have an absolute positioned div(contains some text) within a relative div (contains an image) and it is set to bottom: 0px; however the absolute div is overflowing below the image. I cannot seem to fix this issue, I have tried applying overflow: hidden to the relative div.
Please see below for the issue https://jsfiddle.net/rebeccasmith1301/zzpxe767/
HTML
<div id="page-wrapper">
<div id="footer-header-image">
<div id="header-image-title">
<h2>Some text</h2>
</div>
<img src="http://trustedfinance.co.uk/wp-content/uploads/2014/06/placeholder.png" id="apprentice-img"/>
</div>
</div>
CSS
#page-wrapper {
background-color: red;
height: 400px;
}
#footer-header-image {
position:relative;
}
#header-image-title {
position: absolute;
left: 1.5%;
bottom: 0px;
z-index: 1000;
background-color: rgba(255, 255, 255, .85);
padding: 2% 1.5% 2% 1.5%;
}
#apprentice-img{
width: 100%;
}
There's some line height on the image. Try: