Can we arrange the subcategories like this?

Hi helpful friends.
pvpfarm . com this is my forum (discourse software like sitepoint community)
I want to sort the subcategories so that the icons are one under the other.

This is how I use it now. display : flex
Ekran görüntüsü 2024-06-13 160953

How I want it to look :wave:

If we changes this code display : flex to this display : block
Ekran görüntüsü 2024-06-13 161553

It looks like this, but I don’t want it to look like this.

Can we do that with CSS ?

You should be able to do it with flex. This is obviously quick and dirty but should do what you want.

You are the best.
Thank you. :pray:

Not easily in flex, but you can do it in grid. I gave you two examples here, one where you allow the browser to auto-fit, and one to force the four columns. drag the window frame left and right to see the difference in behavior.


Thank you again :weee:

1 Like

Here is how it can be done with CSS Flexbox:

It uses flex: 0 0 200px to fix the width of the flex items. Some other value of flex-basis could be chosen but with regard to the width of small smartphones.