When attempting to use padding within a d-flex container to separate elements that are placed inline due to the d-flex class, I encountered an issue where the padding was not being applied and did not change anything. If I do not utilize the d-flex class, the elements do not align properly one by one, so it is necessary to use d-flex. How can I ensure that padding works correctly within a d-flex container?
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6c0e0303181f181e0d1c2c59425c425e">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<div class="d-flex mr-2">
<div class="dropdown">
<button class="btn bg-opacity-25 dropdown-toggle border border-dark" style="" id="pageMenu" data-bs-toggle="dropdown"><i class="bi bi-microsoft"> </i></button>
<ul class="dropdown-menu" aria-labelledby="pageMenu">
<li><a class="dropdown-item" href="#">5</a></li>
<li><a class="dropdown-item" href="#">10</a></li>
<li><a class="dropdown-item" href="#">25</a></li>
</ul>
</div>
<div class="dropdown">
<button class="btn bg-opacity-25 dropdown-toggle border border-dark" style="" id="filterMenu" data-bs-toggle="dropdown"><i class="bi bi-funnel"> Filter</i></button>
<ul class="dropdown-menu" aria-labelledby="filterMenu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="67050808131413150617275249574955">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
Example image: https://i.sstatic.net/weguK.png