I'm trying to achieve the following layout with a bootstrap 4 navbar:
--Brand---------------------------Partner brand--
--Item1--Item2--Item3--------------------Logout--
I have two problems:
Everything displays on the same line, having the class of "row"
There's no gap, depite using mr-auto on the left hand item list
I have this code:
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<div class="row">
<div class="navbar-brand flex-column">
<a href="/">
<span class="my-logo"></span> <span class="nav-name">Brand name</span>
<small class="nav-strap">Catchy strapline</small>
</a>
Partner Name
<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>
</div>
<div class="row">
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
logged in as blah
</form>
</div>
</div>
</div>
</nav>
I have experience mostly with BS3 and can't figure out why this isn't working.
**Use following code snippet:**
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container flex-column border">
<div class="row w-100">
<div class="navbar-brand justify-content-between d-flex w-100 m-0">
<a href="/">
<span class="my-logo"></span> <span class="nav-name">Brand name</span>
<small class="nav-strap">Catchy strapline</small>
</a>
Partner Name
<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>
</div>
<div class="row w-100">
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
logged in as blah
</form>
</div>
</div>
</div>
</nav>
Related
I've been searching for it all day and couldn't find a solution, so I hope I won't look like an idiot when in 2 minutes someone will post an answered link for the exact question.
I am trying to create a navbar like on steamdb
Where the search box remains after the navbar collapse and is just reduced in size.
But I ran into the problem where if I set the navbar to <nav class="navbar-expand-lg" </nav> then when it collapses it split into 3 lines, one for the brand, one for search, and one for toggle dropdown.
If I remove the "-lg" then it doesn't split, but then it also doesn't change the items to toggle.
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="/">My Company Name</a>
<form class="d-flex w-100 d-inline-block">
<div class="input-group">
<input class="form-control no-border" type="text" placeholder="search for game..." id="example-search-input">
<span class="input-group-append">
<button class="btn rounded-pill" type="button">
<i class="bi bi-search"></i>
</button>
</span>
</div>
</form>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-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 ms-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Home</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
content
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="/test1">test1</a></li>
<li><a class="dropdown-item" href="/test2">test2</a></li>
<li><a class="dropdown-item" href="/test3">test3</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Donate</a>
</li>
</ul>
</div>
</div>
</nav>
https://www.codeply.com/p/uaWJpGVRED
Please help, I've been stuck on this all day
You need to use 2 inner divs inside the container. Make them both w-100, and the first one d-flex so that the brand and form layout horizontally...
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<div class="d-flex w-100">
<a class="navbar-brand" href="/">My Company Name</a>
<form class="d-flex w-100 d-inline-block">
<div class="input-group">
<input class="form-control no-border" type="text" placeholder="search for game..." id="example-search-input">
<span class="input-group-append">
<button class="btn rounded-pill" type="button">
<i class="bi bi-search"></i>
</button>
</span>
</div>
</form>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="collapse navbar-collapse w-100" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Home</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> content </a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="/test1">test1</a></li>
<li><a class="dropdown-item" href="/test2">something</a></li>
<li><a class="dropdown-item" href="/test3">bla bla</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Donate</a>
</li>
</ul>
</div>
</div>
</nav>
Demo
I like the look of the nav pills on larger screens, but once the collapse button shows I want that menu to be stackable and look like the image attached instead of the pills. Do I need custom css to make this happen?
<div id="menu" class="navbar navbar-expand-md">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".main-nav-collapse" aria-controls="main-nav-collapse" aria-expanded="true" aria-label="Toggle navigation">
<span class="fa fa-bars"></span>
</button>
<div class="collapse navbar-collapse main-nav-collapse">
<nav class="nav nav-pills mr-auto">
<a class="nav-link" href="/"><i class="fa fa-home"></i></a>
</nav>
</div>
</div>
Want this on smaller screens
Want these pills on larger screens but not smaller
I accomplished this with the below code.
<nav class="nav nav-pills mr-auto flex-column d-md-flex flex-md-row">
You can switch those classes d-none and d-flex here.
Why d-flex here instead of d-block because .nav class are made using flexbox so flex is more comfortable than block.
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- TILL 1200PX (XL) -->
<nav class="navbar navbar-expand-lg navbar-light bg-light d-flex d-xl-none">
<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 active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
<!-- AFTER 1200PX (XL) -->
<ul class="nav d-none d-xl-flex">
<li class="nav-item">
<a class="nav-link active" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
I'm newer to Bootstrap and have a question about my Navbar.
Here is my test site. TEST-DOMAIN
I'm currently using Bootstrap 4.3.1 with JQuery 3.4.1.
Menu looks and functions great on Desktop. Dropdown appears as expected. I added columns to the dropdown to make a Mega Menu of sorts.
When the site transitions over to mobile, the dropdown is appearing to the RIGHT of the parent menu item. Is there a way to make it appear BELOW the parent item and push the rest of the menu down below it?
I tried setting the dropdown to Display: absolute as found in other posts about this. But, while it shifts the dropdown to the left like I want, it floats it overtop of the rest of the menu. I would like it to align left, while pushing the rest of the menu below it.
Thanks for any help!
* EDIT - Adding code *
<!--Navbar-->
<nav id="navbar" class="navbar navbar-expand-lg navbar-dark nav-transparent sticky-top">
<div class="container">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#" style="margin-top: -5px;"><strong>Test Website</strong></a>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mr-center">
<li class="nav-item active">
<a class="nav-link" href="home.html">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown btn-group">
<a class="nav-link dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Services</a>
<div class="dropdown-menu dropdown" aria-labelledby="dropdownMenu1">
<div class="container">
<div class="row">
<div class="col-md-4">
<a class="dropdown-item" href="another-page.html">ANOTHER PAGE</a>
<a class="dropdown-item" href="pools.html">POOLS</a>
<a class="dropdown-item" href="test-10.html">TEST 10</a>
<a class="dropdown-item" href="test-5.html">TEST 5</a>
</div>
<div class="col-md-4">
<a class="dropdown-item" href="test-6.html">TEST 6</a>
<a class="dropdown-item" href="test-7.html">TEST 7</a>
<a class="dropdown-item" href="test-8.html">TEST 8</a>
<a class="dropdown-item" href="test-9.html">TEST 9</a>
</div>
<div class="col-md-4">
<a class="dropdown-item" href="yet-another-page.html">YET ANOTHER PAGE</a>
<a class="dropdown-item" href="awesome-page.html">AWESOME PAGE</a>
</div>
</div>
</div>
</div>
</li>
<li class="nav-item"><a class="nav-link" href="about.html">About Us</a></li>
<li class="nav-item"><a class="nav-link" href="gallery.html">Gallery</a></li>
<li class="nav-item"><a class="nav-link" href="faq.html">FAQ</a></li>
<li class="nav-item"><a class="nav-link" href="kitchen-vision.html">KITCHEN VISION</a></li>
<li class="nav-item"><a class="nav-link" href="contact.html">Contact Us</a>
</li>
</ul>
</div>
</div>
I've removed all my custom CSS for the NavBar to make sure I wasn't doing something incorrect with my edits.
#media screen and (max-width: 768px) {
.mx-auto.d-flex {
margin: 0!important;
justify-content: space-between;
display: flex;
width: 100vw;
}
}
<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">
<nav class="navbar navbar-expand-lg navbar-light bg-light sticky-top">
<div class="mx-auto d-flex">
<a class="navbar-brand" href="#">Test Website</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 ">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Services
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<div class="container">
<div class="row">
<div class="col-md-4">
<a class="dropdown-item" href="another-page.html">ANOTHER PAGE</a>
<a class="dropdown-item" href="pools.html">POOLS</a>
<a class="dropdown-item" href="test-10.html">TEST 10</a>
<a class="dropdown-item" href="test-5.html">TEST 5</a>
</div>
<div class="col-md-4">
<a class="dropdown-item" href="test-6.html">TEST 6</a>
<a class="dropdown-item" href="test-7.html">TEST 7</a>
<a class="dropdown-item" href="test-8.html">TEST 8</a>
<a class="dropdown-item" href="test-9.html">TEST 9</a>
</div>
<div class="col-md-4">
<a class="dropdown-item" href="yet-another-page.html">YET ANOTHER PAGE</a>
<a class="dropdown-item" href="awesome-page.html">AWESOME PAGE</a>
</div>
</div>
</div>
</div>
</li>
<li class="nav-item"><a class="nav-link" href="about.html">About Us</a></li>
<li class="nav-item"><a class="nav-link" href="gallery.html">Gallery</a></li>
<li class="nav-item"><a class="nav-link" href="faq.html">FAQ</a></li>
<li class="nav-item"><a class="nav-link" href="kitchen-vision.html">KITCHEN VISION</a></li>
<li class="nav-item"><a class="nav-link" href="contact.html">Contact Us</a>
</li>
</ul>
</div>
</div>
</nav>
I am having issues aligning a dropdown menu on the navbar-brand portion of the Bootstrap 4 Navbar. For some reason it is aligning to the top left of the page.
I have tried the following code below and am not sure how to go from there.
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
WebsiteName
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="/>WebsiteName</a>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">Popular Subdomains</h6>
<a class="dropdown-item" href="/">Subdomain 2</a><a class="dropdown-item" href="/">Subdomain 3</a> <div class="dropdown-divider"></div>
<a class="dropdown-item" href="/">All Subdomains</a>
</div>
<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">
<a class="nav-link" href="/">Home Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/two-link/">Two Link</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0" action="/search">
<input class="form-control mr-sm-2" type="text" name="q" placeholder="Search">
</form>
</div>
</div>
</nav>
just curiosity , are you tring to make your brand is dropdown cause its a big mistake try to read this docs to see how its work
https://getbootstrap.com/docs/4.2/components/navbar/
you can also position your navbar by using float or flex alignment as you wish
I have this navbar:
Where the army of shopping carts should not be collapsed if the screen is made smaller:
So far, so good...
However, when I click the toggle button, my army of shopping carts is also moved down with the menu, like this:
But I want my army of shopping carts, to stay up as well, like in this image (painted for now):
I've looked for a few hours now, and still can't achieve this behaviour. Here is the fiddle.
Code:
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">English Park Cuisine</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">Acasa<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Meniu
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="meniu.php">Pizza</a>
<a class="dropdown-item" href="#">Paste</a>
<a class="dropdown-item" href="#">Supe</a>
<a class="dropdown-item" href="#">Ciorbe</a>
<a class="dropdown-item" href="#">Desert</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Contact</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<p class="dropdown-item">0746117702</p>
<p class="dropdown-item">0742112452</p>
<p class="dropdown-item">0735212352</p>
</div>
</li>
</ul>
</div>
<div class="d-flex order-lg-1 ml-auto pr-2">
<i class="fa fa-shopping-cart fa-lg" style="color: white;"></i>
<i class="fa fa-shopping-cart fa-lg" style="color: white;"></i>
<i class="fa fa-shopping-cart fa-lg" style="color: white;"></i>
</div>
</nav>
The question is very similar to this one, however, you don't see this behaviour there because the order of the navbar is different, which is what makes this question unique.
You can approach this using order-* classes. Just keep the order value of the items you want to keep on the top navbar lower than the value of the button that toggle the collapsed mode. In the next example:
(1) When navbar is not collapsed (lg screens) the army of shopping carts will have order-4 and go last.
(2) When navbar is collapsed, the army of shopping carts will have order-1 and the toggle collapsing button will have order-2. So the collapse button will not affect it.
<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.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<a class="navbar-brand order-0" href="#">English Park Cuisine</a>
<div class="order-lg-4 order-1 ml-auto mr-2">
<a href="#" class="navbar-text">
<i class="fa fa-shopping-cart fa-lg" style="color: white;"></i>
</a>
<a href="#" class="navbar-text">
<i class="fa fa-shopping-cart fa-lg" style="color: white;"></i>
</a>
<a href="#" class="navbar-text">
<i class="fa fa-shopping-cart fa-lg" style="color: white;"></i>
</a>
</div>
<button class="navbar-toggler order-2" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse order-3" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">
Acasa<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Meniu
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="meniu.php">Pizza</a>
<a class="dropdown-item" href="#">Paste</a>
<a class="dropdown-item" href="#">Supe</a>
<a class="dropdown-item" href="#">Ciorbe</a>
<a class="dropdown-item" href="#">Desert</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Contact</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<p class="dropdown-item">0746117702</p>
<p class="dropdown-item">0742112452</p>
<p class="dropdown-item">0735212352</p>
</div>
</li>
</ul>
</div>
</nav>
try this:
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">English Park Cuisine</a>
<div class="d-flex order-lg-1 ml-auto pr-2" style="margin-right:20px;">
<i class="fa fa-shopping-cart fa-lg" style="color: white;"></i>
<i class="fa fa-shopping-cart fa-lg" style="color: white;"></i>
<i class="fa fa-shopping-cart fa-lg" style="color: white;"></i>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">Acasa<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Meniu
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="meniu.php">Pizza</a>
<a class="dropdown-item" href="#">Paste</a>
<a class="dropdown-item" href="#">Supe</a>
<a class="dropdown-item" href="#">Ciorbe</a>
<a class="dropdown-item" href="#">Desert</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Contact</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<p class="dropdown-item">0746117702</p>
<p class="dropdown-item">0742112452</p>
<p class="dropdown-item">0735212352</p>
</div>
</li>
</ul>
</div>
</nav>