I am currently working on a design project using Bootstrap 5 where the navbar is contained and the hero header section below extends beyond the container's boundaries only on the right side.
Below is an image depicting the design I am aiming for:
https://i.sstatic.net/giFXi.jpg
At the moment, I have utilized "container" for the navbar and "container-fluid" for the header section below. However, I am facing difficulty aligning the text on the left with the logo/container size.
Here is a snippet of what I have achieved so far:
<div class="container-fluid-md m-0 p-0">
<div class="row mt-5 m-0 p-0">
<div class="col-lg-6 m-0">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p>
<div class="row">
<div class="col-sm-12">
<button class="btn blue-solid-button btn-sm">Learn more</button>
<button class="btn white-solid-button btn-sm">Contact us</button>
</div>
</div>
</div>
<div class="col-lg-6 m-0 p-0">
<img class="img-fluid curve-home" src="https://images.unsplash.com/photo-1429041966141-44d228a42775?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80">
</div>
</div>
</div>
Another method I am considering is setting both containers to "container" and utilizing an overflow option for the bottom container. Below is the code snippet for this approach:
body {overflow-x:hidden}
.mt-n1 {
z-index: 3;
...
}
<div class="container-lg">
<div class="row mt-5 m-0 p-0">
<div class="col-lg-6">
<h1>Lorem Ipsum</h1>
<p>...
</div>
<div class="col-lg-6 m-0 p-0">
<div class="mt-n1">
<img class="img-fluid curve-home" src="https://images.unsplash.com/photo-1429041966141-44d228a42775?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80" alt="pipelines">
</div>
</div>>
</div>
</div>