Can we arrange the subcategories like this?

Hi helpful friends.

This is how I use it now. display : flex

Can we do it like this?

But not like that. display : block

Thank you :pray:

That looks SO much better :star_struck:

I found the solution this way.
But when the subcategory name is long, it breaks.
I’m waiting if anyone can find a solution to this.
You can use it in this state. :slight_smile:

When long name.

When short name.

.category-list .subcategories {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.category-list .subcategories .subcategory {
    flex-shrink: 0;
    min-width: 25%;
}

You’ll want to use CSS Grids here.

Something like:

.category-list .subcategories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, min-content));
}

If you want the columns to be perfectly equal size, you can change min-content to 1fr.

Now this is much better. Thank you @Alteras :pray:

how can I add this to the theme in my community.

can someone help?

thanks.


Here in CSS write and save

As ogulcan1787 stated, you can create a new component and insert the CSS there.

You can follow these instructions:

thank you @Arkshine

this was helpful.