I am working on a simple webapp with Bootstrap and I need to make the space between the navbar items responsive so that in smaller screens the navbar-items are close toghether but in larger screens they are further apart from each other.
Here is what i have done at the moment:
.title {
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
font-size: 26px;
line-height: 1.25;
}
.btn-bd-sign-in {
font-weight: 600;
color: white;
}
.btn-bd-sign-up {
font-weight: 600;
color: white;
border-color: white;
}
.btn-bd-sign-up:hover {
font-weight: 600;
color: black;
border-color: white;
background-color: white;
}
.home-btn {
font-weight: 600;
color: white!important;
}
.home-btn:hover {
font-weight: 600;
color: #212529!important;
}
body {
height: 100vh;
background: linear-gradient(to right, #33ccff 0%, #ff99cc 100%);
}
button, button:active, button:focus {
background: none!important;
border: none;
}
button:hover {
border-bottom: 3px solid #0275d8;
}
<body>
<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">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<div class="container-fluid padding-left">
<div class="row flex-xl-nowrap">
<div class="col-4">
</div>
<div class="col-8-auto">
<nav class="navbar navbar-expand navbar-light">
<div>
<ul class="navbar-nav mr-md-5 mr-lg-5 mr-xl-5">
<li class="nav-item">
<button class="nav-link" href="#">Profile</button>
</li>
<li class="nav-item">
<button class="nav-link" href="#">Statistics</button>
</li>
<li class="nav-item">
<button class="nav-link" href="#">Polls</button>
</li>
<li class="nav-item">
<button class="nav-link" href="#">Settings</button>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
</body>
How can i achieve this feature?
This is how it looks at the moment:
On mobile devices it looks as expected but i would like on larger devices a little bit more spacing then what it is shown in the image.
