I am struggling to figure out how to create a button that overlaps a div. My goal is for the button to always be positioned at the bottom center of the div, even when the size of the div changes. I can usually create overlapping divs easily when they are not needed, but when I actually need one, it doesn't seem to work!
This is the markup I currently have:
.call_to_action{
background-color: #000;
height: 300px;
}
.button {
background: #c43d3d;
font-size: 24px;
color: #FFFFFF;
margin: 0;
padding: 0;
border: 0;
cursor: pointer;
padding: 20px 25px;
width:200px;
text-align: center;
}
.overlap-header {
position: relative;
}
.overlap-button {
position: relative;
display: block;
margin: 100px auto 25px;
}
<section class="call_to_action">
<div class="wrapper">
<div class="content-block">
<div class="content-block-wrapper">
<div class="overlap-header">
<span class="button overlap-button">Read more</span>
</div>
</div>
</div>
</div>
</section>
https://i.sstatic.net/utbG2.png
Here's an image showcasing what I am aiming to achieve.