I’ve been trying to make a two column full height page and I don’t wish to use cards since there’s going to be no images but a whole lot of text, links and buttons in the halves. I am not even sure if that is possible with Bootstrap columns but if there is a way kindly help by publishing the code for the same below. To be precise, the problem is that the columns are stuck at the top of the container and I am unable to stretch them to fill the entire page.
What I have right now:
<div class="container-xxl text-center" style="margin: 20px auto 20px auto;">
<div class="row">
<div class="col-lg text-bg-light">
</div>
<div class="col-lg text-bg-secondary">
</div>
</div>
</div>
>Solution :
Here you go…
Add the vh-100 class (100vh will be 100% of the viewport height). Read more about it here.
.col-lg {
border: 1px solid red;
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<div class="container-xxl text-center" style="margin: 20px auto 20px auto;">
<div class="row">
<div class="col-lg text-bg-light vh-100">
</div>
<div class="col-lg text-bg-secondary vh-100">
</div>
</div>
</div>