Exploring the code of the website you referenced can lead you to some interesting discoveries. The dropdown-menu
class appears to have a width
property set to 420px
and a flex-wrap
property with the value of wrap
when it is visible. Each item in that div is assigned the dropdown-item
class with a width
property of 33,33%
, allowing for three rows with equal spacing. It seems pretty straightforward.
<div class="dropdown-menu" aria-labelledby="themes">
<a class="dropdown-item" href="../default/">Default</a>
<a class="dropdown-item" href="../united/">United</a>
<a class="dropdown-item" href="../yeti/">Yeti</a>
</div>
.dropdown-menu.show {
display: flex;
width: 420px;
flex-wrap: wrap;
}
.dropdown-item {
width: 33,33%;
}
This is a common approach. Personally, I often use the inspector tool to dissect elements I find visually appealing on various websites.