I'm using a absolute positioned div on top of an image. The div has a coloured background with an opacity less than 1 (so you can see the image). My issue is that you can see some white space below the image.
#zero {
max-width: 450px;
margin: 0 auto;
}
#container {
position: relative;
}
img {
width: 100%;
height: auto;
margin: 0;
padding: 0;
}
#title {
position: absolute;
top: 0;
right: 0 bottom: 0;
left: 0;
height: 100%;
width: 100%;
margin: 0;
color: white;
background-color: red;
opacity: 0.67;
}
<div id="zero">
<div id="container">
<img src="450x300.jpg">
<h2 id="title">Title</h2>
</div>
<p>How to get rid of the white space below the image?</p>
</div>