I am currently implementing bootstrap 4.0 on my website. The dropdown menu is positioned at the top right corner of the screen. However, when a user clicks on the dropdown menu, it causes the page to expand slightly to the right, resulting in white space next to the navigation bar.
Here is a visual representation: https://i.sstatic.net/xhHZR.png
Below is the code snippet that I am using:
<div class="dropdown dropdown-left">
<button class="btn btn-secondary dropdown-toggle bg-dark" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown
</button>
<div class="dropdown-menu bg-dark" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item text-light" href="#">Action</a>
<a class="dropdown-item text-light" href="#">Another action</a>
</div>
</div>