1
I have a page that I’m going to split into two columns. The right column should be aligned both vertically and horizontally and cannot create a scroll bar. I managed to do this, but as there is a navbar, the second column is getting bigger than the screen size, thus creating the scroll bar. How do I center this column vertically without creating the scroll bar, taking into account the size of my navbar?
html, body{
height: 100%;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet"/>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
</ul>
</div>
</nav>
<div class="container h-100">
<div class="row h-100">
<div class="col">
<p class="bg-white">Coluna 1</p>
</div>
<div class="col d-flex bg-info justify-content-center align-items-center">
<p class="bg-white">Coluna 2</p>
</div>
</div>
</div>