As I work on building a website with bootstrap 4, I've encountered a challenge.
https://i.sstatic.net/eb59f.jpg%60
The layout includes a fluid container setup where the header and footer backgrounds need to extend all the way to the page edges.
Inside the header and footer sections, there is a container for menu items and footer content to ensure everything remains centered.
However, the content between the header and footer needs to function differently. For example, using columns to display varying colors on each side (such as blue and white). The goal here is to align the content with the header and footer elements (ensuring the left edge of the menu in the header lines up with the text content).
I am unsure how to proceed with this task. I attempted overlaying a container on top of the container-fluid but faced alignment issues with the rows.
I have created a code pen showcasing my progress so far.
CSS:
.rowoverlay {
position: absolute;
top: 0;
left: 0;
z-index: 0;
bottom: 0;
right: 0;
height: 100%;
}
HTML
<div class="container-fluid homepage-text-plugin">
<div class="row rowoverlay">
<div class="col-md-12 col-lg-5" style="background-color: green;"></div>
<div class="col-md-12 col-lg-7" style="background-color: red;">
</div>
</div>
<div class="container ">
<div class="row">
<div class="col-md-12 col-lg-4 " style="background-color: blue;">
A text block
</div>
<div class="col-md-12 col-lg-7" style="background-color: yellow;">
More text<p>
</div>
</div>
</div>
</div>