Vertical line on Bootstrap 5 - html

May I ask as to how to create a vertical line that extends all the way down the right side of the listed items on this website? since I'll place the main content after the vertical line I'm trying to figure out
.first a.nav-link {
background-color: #ebe0dd;
}
a.nav-link {
font-size: 23px;
font-family: font-family: 'Times New Roman', Times, serif;
color: black;
font-weight: lighter;
}
<div class="container d-flex flex-column flex-md-row">
<nav class="navbar navbar-expand-md navbar-light d-flex flex-md-column">
<button
class = "navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#sidebar"
aria-controls="sidebar"
aria-expanded="false"
aria-label="Toggle Navigation">
<span class = "navbar-toggler-icon"></span>
</button>
<div class = "collapse navbar-collapse sidebar" id = "sidebar">
<ul class = "navbar-nav w-750 my-3 d-flex flex-md-column text-center ">
<li class = "first">All</li>
<li>To Pay</li>
<li><a href="#" class = "nav-link" >To Ship</a></li>
<li><a href="#" class = "nav-link" >To Receive</a></li>
<li><a href="#" class = "nav-link" >Completed</a></li>
<li><a href="#" class = "nav-link" >Cancelled</a></li>
</ul>
</div>
</nav>
</div>

Add the border-end class to the ul element:
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<div class="container d-flex flex-column flex-md-row">
<nav class="navbar navbar-expand navbar-light flex-column" style="height: 100vh;">
<button
class = "navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#sidebar"
aria-controls="sidebar"
aria-expanded="false"
aria-label="Toggle Navigation">
<span class = "navbar-toggler-icon"></span>
</button>
<div class = "collapse navbar-collapse sidebar" id="sidebar">
<ul class = "navbar-nav h-100 w-750 my-3 d-flex flex-column text-center border-end">
<li class = "first">All</li>
<li>To Pay</li>
<li><a href="#" class = "nav-link" >To Ship</a></li>
<li><a href="#" class = "nav-link" >To Receive</a></li>
<li><a href="#" class = "nav-link" >Completed</a></li>
<li><a href="#" class = "nav-link" >Cancelled</a></li>
</ul>
</div>
</nav>
</div>

Related

Navbar not collapsing soon enough - cutting off right-most item

I have a navbar menu in Bootstrap 4. When I resize the page, it resizes after a certain size threshold, but before it collapses, the far-right item "Opportunities" in the navbar is being cutoff.
In other words, it's cutting off items - it eventually collapses if the window gets too small - but before that, it's cutting off. See photo here:
Is there an easy fix here? Code below..
/* ------------------------------Navigation------------------------------*/
/* Navigation pills */
#navPills li{
padding:6px 6px 6px 6px !important;
font-size: 14px !important;
}
#nav-pills ul{
}
/* Navigation pills text*/
.btn.btn-s-md.btn-white.m-b {
font-size: 14px !important;
letter-spacing: .04em;
}
.navbar {
background-color:#f7f7f7 !important;
padding-bottom:10px;
border-bottom:1px solid #E6E7E8;
-webkit-box-shadow: 0px 1px 2px rgba(159,159,155,0.4)
}
#toggle {
background-color:none;
color:black;
}
.nav-item {
text-align: right;
padding:0px 10px 0px 10px
}
.nav-link {
text-align:left;
font-size:14px;
color:#0c2d1c !important;
}
#navbarNav {
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle#3.6.1/css/bootstrap4-toggle.min.css" rel="stylesheet">
<body>
<!-- Navigation -->
<nav id="navbar" class="navbar navbar-expand-lg navbar-light bg-dark sticky-top">
<a class="navbar-brand" href="#">
<div class="logo_subheader">
Land Use and Environment Lab
<br>
</div>
<div class="logo_header">
GLUE
<br>
</div>
</a>
<button id="toggle" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse text-left" id="navbarNav">
<ul id = "navPills" class=" nav-pills navbar-nav ml-auto">
<li>
<a href="index.html" class="btn btn-s-md btn-white m-b active">ABOUT
</a>
</li>
<li>
<a href="people.html" class="btn btn-s-md btn-white m-b">
PEOPLE
</a>
</li>
<li>
<a href="research.html" class="btn btn-s-md btn-white m-b">RESEARCH
</a>
</li>
<li>
<a href="publications.html" class="btn btn-s-md btn-white m-b">PUBLICATIONS
</a>
</li>
<li>
<a href="media.html" class="btn btn-s-md btn-white m-b">
MEDIA
</a>
</li>
<li>
<a href="teaching.html" class="btn btn-s-md btn-white m-b">
TEACHING
</a>
</li>
<li>
<a href="opportunities.html" class="btn btn-s-md btn-white m-b">
OPPORTUNITIES
</a>
</li>
</ul>
</div>
</nav>
</body>
<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle#3.6.1/js/bootstrap4-toggle.min.js"></script>
Based on Bootstrap 4 docs for Navbar example (https://getbootstrap.com/docs/4.0/components/navbar/), I would erase your li classes as they seem to cause the overlap with the edge of the viewport to happen.
If you put these classes on your ul element you will have the same lg collapse and styling of buttons. See code below for the changes I am referring to.
<nav id="navbar" class="navbar navbar-expand-lg navbar-light bg-dark sticky-top">
<a class="navbar-brand" href="#">
<div class="logo_subheader">
Land Use and Environment Lab
<br>
</div>
<div class="logo_header">
GLUE
<br>
</div>
</a>
<button id="toggle" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse text-left" id="navbarNav">
<ul id="navPills" class=" nav-pills navbar-nav ml-auto btn btn-s-md btn-white m-b">
<li>
<a href="index.html">ABOUT
</a>
</li>
<li>
<a href="people.html">
PEOPLE
</a>
</li>
<li>
<a href="research.html">RESEARCH
</a>
</li>
<li>
<a href="publications.html">PUBLICATIONS
</a>
</li>
<li>
<a href="media.html">
MEDIA
</a>
</li>
<li>
<a href="teaching.html">
TEACHING
</a>
</li>
<li>
<a href="opportunities.html">
OPPORTUNITIES
</a>
</li>
</ul>
</div>

navbar doesn't expand on mobile with bootstrap5

I'm making a website with Bootstrap 5 and my navbar doesn't work.
When I'm on mobile it does not expand.
#import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght#0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
/*
#FF3633 - Vermelho
*/
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
/* estilo - header */
.navbar {
background-color: #131313;
padding: 1rem 8rem;
z-index: 1000;
}
.navbar .navbar-brand {
font-size: 1.4rem;
font-weight: 800;
}
#navbarSupportedContent > ul > li:nth-child(n) > a {
color: #fff;
font-size: 1.1rem;
padding: 0 0.8rem;
}
#navbarSupportedContent > ul > li:nth-child(n) > a:hover {
color: #FF3633;
}
#navbarSupportedContent button {
background-color: #FF3633;
font-weight: 600;
padding: 0.4rem 1.4rem;
border-radius: 30px;
outline: none;
}
#navbarSupportedContent button:hover {
background-color: #CC3036;
}
<header>
<nav class="navbar navbar-expand-lg navbar-dark fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="img/logo-wt.png" width="100" height="30" alt="">
</a>
<button class="navbar-toggler" type="button" data-bs-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 mx-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="#">Quem Somos</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Serviços</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Serviços</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contato</a>
</li>
</ul>
<button class="btn text-light" type="submit">Contato</button>
</div>
</div>
</nav>
<div class="mid">
<video autoplay muted loop>
<source class="embed-responsive" src="darkvd.mp4" type="video/mp4">
</video>
<div class="hero text-center">
<h2 class="text-light display-3 fw-bold m-lg-3 mx-3">Suporte Linux e Cloud</h2>
<p class="text-light mx-auto">Criando um paralelo entre baixo custo, disponibilidade, praticidade e satisfação</p>
<a class="text-light fw-bold m-lg-3 mx-3 " href="#"> SAIBA MAIS </a>
</div>
</div>
<header>
<nav class="navbar navbar-expand-lg navbar-dark fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="img/logo-wt.png" width="100" height="30" alt="">
</a>
<button class="navbar-toggler" type="button" data-bs-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 mx-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="#">Quem Somos</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Serviços</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Serviços</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contato</a>
</li>
</ul>
<button class="btn text-light" type="submit">Contato</button>
</div>
</div>
</nav>
<div class="mid">
<video autoplay muted loop>
<source class="embed-responsive" src="darkvd.mp4" type="video/mp4">
</video>
<div class="hero text-center">
<h2 class="text-light display-3 fw-bold m-lg-3 mx-3">Suporte Linux e Cloud</h2>
<p class="text-light mx-auto">Criando um paralelo entre baixo custo, disponibilidade, praticidade e satisfação</p>
<a class="text-light fw-bold m-lg-3 mx-3 " href="#"> SAIBA MAIS </a>
</div>
</div>
button pic
Bootstrap 5 has namespaced all of the data attribute names with data-bs-*.
Change the following:
data-target="#navbarSupportedContent"
to this:
data-bs-target="#navbarSupportedContent"
In your button in which you are collapsing the navbar then main attribute tags are not there. Main attributes used are data-toggle="collapse" data-target=".nav-collapse". Second change is that see if you added these links or add bundle from https://getbootstrap.com/docs/5.0/getting-started/introduction/
<script src="https://cdn.jsdelivr.net/npm/#popperjs/core#2.6.0/dist/umd/popper.min.js" integrity="sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi" crossorigin="anonymous"></script>
Hope my answer helps you
I have managed to solve it with js codes from my external js file which I had already included on the page before closing of body tag.
Below here are my js codes which I used to and managed to solve the issue:
$(document).ready(function(){
//--Navbar_Toggle_icon--//
NavItemsStatus = '';
$('.navbar-toggler-icon').mousedown(function(){
//---Check if the NavItems are opened, if so then close them, otherwise open them--//
if((NavItemsStatus == "")|| (NavItemsStatus == undefined)){
NavItemsStatus = 'on';
//--Do nothing here as the nav items are sliding down after clicked for the first time--//
}else if((NavItemsStatus == "off")){
NavItemsStatus = 'on';
$("#navbarNavAltMarkup").show(600); //the id which was called on data-bs-target
}else{
NavItemsStatus = 'off';
$("#navbarNavAltMarkup").hide();
$("#navbarNavAltMarkup").css('height','0px');
}
})
});
So for your case the id to use is #navbarSupportedContent.
There is my universal working solution:
$(document).ready(function(){
$('a[data-bs-toggle="collapse"]').mouseup(function(){
var expanded = $(this).attr('aria-expanded');
if(expanded=="true"){
setTimeout(() => {
hide_collapse(this);
}, 100);
}
})
function hide_collapse(element){
var aria_control = $(element).attr('aria-controls');
$("#"+aria_control).removeClass("show");
$(element).attr('aria-expanded',"false");
}
});
for the navbar to work you need to include some javascript (even if you will not use it). The provided links in bootstrap -> get started-> JS do not really work.
So to make it fast and easy for you, here is the header where you need to add your title.
<head>
<meta charset="utf-8">
<title>TinDog</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<link rel="stylesheet" href="css/styles.css">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</head>

padding not working in fluid container in bootstarp 4.5 v [duplicate]

This question already has answers here:
Understanding CSS selector priority / specificity
(4 answers)
Closed 2 years ago.
<body>
<section id="title">
<div class="container-fluid">
<nav class="navbar navbar-expand-lg navbar-dark">
<a class="navbar-brand" href="">TinDog</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo01">
<ul class="navbar-nav ml-auto">
<li class="nav-item"></li>
<a class="nav-link" href="">Contact</a>
<li class="nav-item"></li>
<a class="nav-link" href="">pricing</a>
<li class="nav-item"></li>
<a class="nav-link" href="">Download</a>
</ul>
</div>
</nav>
<!-- Title -->
<div class="row">
<div class="col-lg-6 col-md-12">
<h1>Meet new and interesting dogs nearby.</h1>
<button type="button">Download</button>
<button type="button">Download</button>
</div>
<div class="col-lg-6 col-md-12">
<img src="images/iphone6.png" alt="iphone-mockup">
</div>
</div>
</div>
</section>
--------css--------------------------------------------
#title{
background-color:#ff4c68;
}
h1{
font-family: 'Montserrat', sans-serif;
font-size: 3rem;
line-height: 1.5;
}
.container-fluid{
padding:200px;
}
padding is not working in bootstrap v 4.5 in fluid containers all style sheets are linked properly but why padding is not getting applied? also if i write padding left or right still it do not work?
If you want to add a padding then you can simply do
.container-fluid{
padding: 200px !important;
}
or give the div an id and then specify the padding without !important.

Bootstrap header adjustments on collapsible navbar

JS Fiddle Link
https://jsfiddle.net/9dumrg8v/1/
Here is the look of my current header
I have a few goals that I want working:
1. Keep the collapsible bar and image on the same line
I would like to have it "locked" on a line when it gets adjusted to a smaller window:
The image and collapsible bar is separated since I don't include the image in the dropdown
<a class="navbar-brand" href="main">
<img src="img/logo_header.png" class="img-responsive img-header" width="200">
</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">
</div>
2. Include the links in the bottom in the collapsible navbar
Have the list (one-six) be with the navbar when it appears, currently they are separated.
Also, If I try to add it inside the <div class="collapse navbar-collapse" id="navbarSupportedContent">, it gets included in the same row and destroys the design.
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<div class="mwc-orange-nav">
<div class="container">
<div class="row px-4">
<div class="col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="" class="menu-header">
One</a>
</div>
<div class="col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="" class="menu-header">
Two</a>
</div>
<div class="col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="" class="menu-header">
Three</a>
</div>
<div class="col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="" class="menu-header">
Four</a>
</div>
<div class="col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="" class="menu-header">
Five</a>
</div>
<div class="col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="" class="menu-header">
Six</a>
</div>
</div>
</div>
</div>
Any help would be appreciated, thank you.
Please try this code. We have altered the structure somewhat.
.navbar.navbar-expand-md.navbar-light { padding: 0; flex-direction: column; -webkit-flex-direction: column; }
.menu-top .login-btn { padding: 0 10px;}
.navbar-expand-md > .container > div { width: 100%; }
.menu-top { display: flex; display:-webkit-flex; align-items: center; -webkit-align-items: center;}
.navbar-expand-md .navbar-collapse { width:100%;}
.menu-box {
padding: 0px 45px;
}
.menu-box a {
color: white !important;
}
.menu-box:hover {
background-color: white;
}
.menu-box:hover a {
color: #f08400 !important;
text-decoration: none;
}
.mwc-orange-nav {
background-color: rgb(240,132,0, 0.8);
}
.bg-blue{
background: #00a6a6 !important;
border-color: #00a6a6 !important;
}
.curve-right {
border-top-right-radius: 10px !important;
border-bottom-right-radius: 10px !important;
}
.fa-search {
color:
#fff !important;
}
.header-font {
font-size: 18px;
color: #00a6a6;
}
.header-font:hover {
text-decoration: none;
color: #007070;
}
.header-box {
box-sizing: content-box;
padding: 5px 25px;
border-radius: 10px;
border: 2px solid #00a6a6;
color: #00a6a6;
}
.header-box:hover {
text-decoration: none;
color: white;
background-color: #00a6a6;
}
#media(max-width:767px){
.menu-top { padding: 0 10px; display: block; }
.menu-box { flex-basis: auto; -webkit-flex-basis: auto; }
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<div class="nav-header"> <!-- start header -->
<nav class="navbar navbar-expand-md navbar-light">
<div class="container pt-3">
<div class="menu-top">
<a class="navbar-brand" href="main">
<img src="https://www.webkit.org/blog-files/acid3-100.png" class="img-fluid" width="200">
</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>
<form action="cards/search.php" method="POST" class="d-inline w-50 mx-auto">
<div class="input-group">
<input type="text" name="text-search" id="searchBox" class="form-control search-bar" aria-label="Default" aria-describedby="inputGroup-sizing-default" placeholder="Search" required>
<div class="input-group-prepend">
<button type="submit" name="submit-search" class="input-group-text bg-blue curve-right"> <i class="fas fa-search"></i> </button>
</div>
</div>
<div id="response" class="scrollbar-design search-content"></div>
</form>
<div class="row login-btn">
<div class="col-md-6 mb-2 mt-2">
Login
</div>
<div class="col-md-6 mb-2 mt-2">
Register
</div>
</div>
</div>
</div>
<div class="collapse navbar-collapse mwc-orange-nav" id="navbarSupportedContent">
<div class="container">
<ul class="navbar-nav row px-4">
<li class="nav-item col text-center dropdown menu-holder menu-box pb-2 pt-2 active">
<a href="cards/list-new.php" class=" nav-link menu-header">
One</a>
</li>
<li class="nav-item col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="cards/list.php?tn=beauty" class="nav-link menu-header">
Two</a>
</li>
<li class="nav-item col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="cards/list.php?tn=health" class="nav-link menu-header">
Three</a>
</li>
<li class="nav-item col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="cards/list.php?tn=wellness" class="nav-link menu-header">
Four</a>
</li>
<li class="nav-item col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="cards/list-partners.php" class="nav-link menu-header">
Five</a>
</li>
<li class="nav-item col text-center dropdown menu-holder menu-box pb-2 pt-2">
<a href="articles" class="nav-link menu-header">
Six</a>
</li>
</ul>
</div>
</div>
</nav>
</div><!-- end header-->

Jumbotron breaks navbar on mobile website

Bootstrap Jumbotrons go out of the container on my website which means the navbar on the mobile version does not fill the screen. Other pages where I don't have a jumbotron this problem does not occur.
I tried using a Card instead, but that has some problems when I put it anything other than text
<div class="row">
<div class="jumbotron col-lg-8 col-md-12"
style='margin-left: 15px; margin-top: 15px; padding-top: 10px; padding-bottom: 10px; margin-bottom: 10px;'>
<h1 class="display-3">
<b>Welcome to SkyWars.fun</b>
</h1>
<p class="lead">We focus on updating regularly, and we listen close to
our community suggestions.</p>
<hr class="my-4">
<p>We have a perk system, comparable with kits or abillities. Any
player can enable 3 perks at once. These perks give small advantages
for your gameplay. Choose wisely, and adapt with your perks! Happy
SkyWars! And have fun!</p>
<p class="lead">
<a class="btn btn-primary btn-lg" href="../tips" role="button">Tips
and tricks</a>
</p>
</div>
</div>
and for the navbar
<nav class="navbar navbar-expand-lg navbar-dark bg-primary" role="navigation">
<a class="navbar-brand" href="../">IP: SkyWars.fun</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarColor01" aria-controls="navbarColor01"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav mr-auto">
<li
class="nav-item <?php if($_SERVER['REQUEST_URI'] === '/') echo 'active' ?>"><a
class="nav-link" href="https://www.skywars.fun/" title="Go to the main page">Home </a></li>
<li class="nav-item <?php if(isPage('/about/')) echo 'active' ?>"><a
class="nav-link" href="https://www.skywars.fun/about" title="Information about SkyWars.fun">About</a></li>
<li class="nav-item <?php if(isPage('/tips/')) echo 'active' ?>"><a
class="nav-link" href="https://www.skywars.fun/tips" title="Tips and Tricks">Tips</a></li>
<li class="nav-item <?php if(isPage('/donate/')) echo 'active' ?>"><a
class="nav-link" href="https://www.skywars.fun/donate" title="Donate">Donate</a></li>
<li class="nav-item <?php if(isPage('/search/')) echo 'active' ?>"><a
class="nav-link" href="https://www.skywars.fun/search" title="Leaderboard">Leaderboard</a></li>
</ul>
<form class="form-inline my-2 my-lg-0" action="../search" title="Lookup player">
<input class="form-control mr-sm-2" type="text" name="player"
placeholder="Search player">
<button class="btn btn-secondary my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
Images of the problem
https://drive.google.com/file/d/0ByAYcnq6pPDmNlJsUUNBbkM1aFRITEQ5TUF4U0JxWXpOYVBV/view?usp=sharing
https://drive.google.com/file/d/0ByAYcnq6pPDmcnVsbTNMbkI2MnlNdmZocmtXV0FWbXpmUTdN/view?usp=sharing
* {
margin: 0;
padding: 0;
}
.banner {
background: #e9ecef;
}
#media only screen and (max-width: 767px) {
.display-3 {
font-size: 2rem !important;
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary" role="navigation">
<a class="navbar-brand" href="../">IP: SkyWars.fun</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarColor01" aria-controls="navbarColor01"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor01">
<ul class="navbar-nav mr-auto">
<li
class="nav-item <?php if($_SERVER['REQUEST_URI'] === '/') echo 'active' ?>"><a class="nav-link" href="https://www.skywars.fun/" title="Go to the main page">Home </a></li>
<li class="nav-item <?php if(isPage('/about/')) echo 'active' ?>"><a class="nav-link" href="https://www.skywars.fun/about" title="Information about SkyWars.fun">About</a></li>
<li class="nav-item <?php if(isPage('/tips/')) echo 'active' ?>"><a class="nav-link" href="https://www.skywars.fun/tips" title="Tips and Tricks">Tips</a></li>
<li class="nav-item <?php if(isPage('/donate/')) echo 'active' ?>"><a class="nav-link" href="https://www.skywars.fun/donate" title="Donate">Donate</a></li>
<li class="nav-item <?php if(isPage('/search/')) echo 'active' ?>"><a class="nav-link" href="https://www.skywars.fun/search" title="Leaderboard">Leaderboard</a></li>
</ul>
<form class="form-inline my-2 my-lg-0" action="../search" title="Lookup player">
<input class="form-control mr-sm-2" type="text" name="player"
placeholder="Search player">
<button class="btn btn-secondary my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
<section class="banner">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="jumbotron">
<h1 class="display-3">
<b>Welcome to SkyWars.fun</b>
</h1>
<p class="lead">We focus on updating regularly, and we listen close to
our community suggestions.
</p>
<hr class="my-4">
<p>We have a perk system, comparable with kits or abillities. Any
player can enable 3 perks at once. These perks give small advantages
for your gameplay. Choose wisely, and adapt with your perks! Happy
SkyWars! And have fun!
</p>
<p class="lead">
<a class="btn btn-primary btn-lg" href="../tips" role="button">Tips
and tricks</a>
</p>
</div>
</div>
</div>
</div>
</section>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</body>
</html>
I have reduced font-size for small devices, it was getting out of the container. Also use .container > .row > .col-lg-12 [just for example] before using the main class. For reference go through https://getbootstrap.com/docs/4.1/layout/grid/ this link. Hope it'll solve your problem