I am utilizing a dropdown
that contains 3 main "categories", each with multiple checkboxes for filtering search results. Below is an example:
<div class="dropdown">
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown">Button</button>
<div class="dropdown-menu">
<h6 class="dropdown-header">Category 1:</h6>
<a class="dropdown-item" href="#"><input type="checkbox"> Option1</a>
<a class="dropdown-item" href="#"><input type="checkbox"> Option2</a>
<a class="dropdown-item" href="#"><input type="checkbox"> Option3</a>
<h6 class="dropdown-header">Category 2:</h6>
<a class="dropdown-item" href="#"><input type="checkbox"> Option1</a>
<a class="dropdown-item" href="#"><input type="checkbox"> Option2</a>
<a class="dropdown-item" href="#"><input type="checkbox"> Option3</a>
<h6 class="dropdown-header">Category 3:</h6>
<a class="dropdown-item" href="#"><input type="checkbox"> Option1</a>
<a class="dropdown-item" href="#"><input type="checkbox"> Option2</a>
<a class="dropdown-item" href="#"><input type="checkbox"> Option3</a>
</div>
</div>
I am looking to have the 3 main "categories" displayed side by side in the dropdown
, but the default Bootstrap styling presents them as a vertical stack. I attempted to use the grid system by applying the row
class to the dropdown
and adding a col-4
for each "category", but it did not yield the desired outcome. How can I achieve the layout where each "category" is positioned next to each other with their respective checkboxes below?