Can anyone help me figure out why the .navbar
is not displaying correctly on half of the screen? I think there might be another container causing the issue, but I'm unsure.
I've set the body to 100vh to cover the entire screen
The
.navbar
should take up half of that using a percentage
This is my HTML file:
body {
background-color: red !important;
width: 100vh;
height: 100vh;
}
.navbar{
width: 50%;
background-color: white;
}
.navbarButtons{
background-color: aqua;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="navbar">
<div class="navbarButtons">
<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-primary">Primary</button>
</div>
</div>