When I click on the dropdown in the Navbar on the right side, the menus open up far to the right and are not visible until I scroll horizontally.
Here is the code snippet:
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<div style="margin-bottom: 0px;" class="navbar-header justify-content-start">
<a class="navbar-brand" href="#">
<img width="100" src="assets/Acc_logo.png" alt="logo">
</a>
</div>
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"
aria-haspopup="true" id="dropdownMenuButton" aria-expanded="false">
<div class="divIcom"></div>
<div class="divIcom"></div>
<div class="divIcom"></div>
</button>
<ul class="dropdown-menu dropdown-menu-sm-right" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</ul>
</div>
</div>
</nav>
Additionally, some CSS has been added:
li {
list-style-type: none;
}
.divIcom {
width: 30px;
height: 3px;
background-color: gray;
margin: 6px 0;
}
.dropdown-toggle::after {
display:none;
}
Styles used in angular.json
:
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
"./node_modules/bootstrap-icons/font/bootstrap-icons.css",
"src/styles.css"
],
"scripts": [
"./node_modules/jquery/dist/jquery.min.js",
"./node_modules/popper.js/dist/umd/popper.min.js",
"./node_modules/bootstrap/dist/js/bootstrap.min.js",
"./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js",
"./node_modules/chart.js/dist/Chart.min.js"
]
},
https://i.stack.imgur.com/quoud.png
Edit 1 -
zone.js:1711 Uncaught TypeError: i.createPopper is not a function
at Mt._createPopper (node_modules\bootstrap\dist\js\bootstrap.min.js:6:23961)
at Mt.show (node_modules\bootstrap\dist\js\bootstrap.min.js:6:22277)
at Mt.toggle (node_modules\bootstrap\dist\js\bootstrap.min.js:6:22073)
at HTMLButtonElement.<anonymous> (node_modules\bootstrap\dist\js\bootstrap.min.js:6:26705)
at HTMLDocument.s (node_modules\bootstrap\dist\js\bootstrap.min.js:6:4456)
at _ZoneDelegate.invokeTask (zone.js:406:31)
at Zone.runTask (zone.js:178:47)
at ZoneTask.invokeTask [as invoke] (zone.js:487:34)
at invokeTask (zone.js:1661:18)
at globalCallback (zone.js:1704:33)
Can someone help me fix this issue?