I am facing an issue with my content overlapping in the bottom padding area. I want to create space at the bottom and top, but while the top space is working fine, the bottom padding area is causing content overlap.
Can anyone provide a solution for this type of issue? Additionally, I would appreciate suggestions on how to scroll the content area when entering large text in the box. I have also attached an image showing the overlap, please check it out.
Thanks in Advance.
https://i.sstatic.net/IUFiV.jpg
* {
box-sizing: border-box;
}
.box {
width: 400px;
height: 200px;
margin: 0 auto;
position: relative;
}
img {
max-width: 100%;
}
.content {
position: absolute;
height: 100%;
bottom: 20px;
padding: 15px;
overflow: hidden;
left: 0;
background-color: rgba(0,0,0,0.5);
color: #fff;
top: 0;
}
.content p {
margin-bottom: 0;
}
<section class="features-box-style">
<div class="box">
<div class="image">
<img src="http://placekitten.com/1000/500" alt="" />
</div>
<div class="content">
<p>Lorem Ipsum is simply dummy text... printer</p>
</div>
</div>
</section>