I've been working on centering everything within this div vertically, and I've encountered some challenges along the way.
Initially, I ensured that my background view extends my container nicely across the screen. Now, I'm looking to create columns within this div. However, when I try to implement columns, the position:relative
property doesn't seem to work as expected.
<div class="container">
<div class="top_block">
<div class="row">
<div class="col-md-4">
<h3 class="">My Website</h3>
</div>
<div class="col-md-8">
Other Content
</div>
</div>
</div>
</div>
SCSS
.top_block {
height: 50px;
background-color: rgba(33,35,38,1);
&::before {
content: "";
height: inherit;
width: 10000px;
position: absolute;
z-index: -1;
background-color: rgba(33,35,38,1);
left: -2000px;
}
h3 {
color:white;
}
}