Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Full height two column page using Bootstrap 5 but without cards in them

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>

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>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>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading