I am trying to achieve the design displayed in this mockup: https://i.sstatic.net/sYEPu.png
Here is my current progress: https://codepen.io/raney24/pen/VOmjBY
.header-border {
width: 100%;
margin-bottom: 10px;
border-left: red solid 1px;
border-right: red solid 1px;
border-bottom: red solid 1px;
.heading, .heading-subtitle {
text-align: center;
}
.heading > span, .heading-subtitle > span {
background-color: white;
box-shadow: white 11px 0px 0px,
white -13px 0px 0px;
&:after {
content: '';
border-top: 1px solid red;
height: 1px;
width: 100%;
display: block;
position: relative;
top: -20px;
z-index: -1;
}
}
.heading-subtitle > span {
&:after {
top: -13px;
}
}
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="header-border">
<h2 class="heading"><span>Learn More About What We Do</span></h2>
<div class="col-sm-4">
<div class="header-border">
<h4 class="heading-subtitle"><span>Coding School</span></h4>
<p>Awesome Inc U is our coding school. It is for both adults and children. We have taught over 1500 people to code with us.</p>
<div class="text-center">
<a class="btn btn-sm btn-primary" href="#">Read More</a>
</div>
</div>
</div>
</div>
</div> <!-- row-->
</div><!-- container -->
I am facing a challenge moving the borders down without overlapping the header borders. I am open to suggestions on alternative approaches or solutions.
While I am willing to use JavaScript/JQuery, I would prefer to avoid it if possible.