Resize category banners

After the update of the forum, the category banners on mobile version go out of the box, I imagine that fixing the size of the banners could be solved.

Could anyone help me please?

Thanks in advance.

Dramebaaz Anybody There GIF by Grish Majethiya

Hello,

I think it cause this css

.category-logo.aspect-image {
  width: calc(var(--max-height) * var(--aspect-ratio));
}

Here the max-height is 150px and the aspect ratio depending by the image. It means if you have an image with aspect ratio 6… then it will be 150 x 6 = 900px width image. So it depending the image aspect ratio.

But you can overwrite this calculation…(not this but it will affect it) with the following.
Add a fix max-width to the image. So the image cannot be wider than this value.
Add the following to mobile css section.

.category-list .category-logo.aspect-image {
  max-width: 250px;
}

Or you can try something like this on mobile. It will calculate the viewport max width and align the image to this.

.category-list .category-logo.aspect-image {
  max-width: calc(100vw - 2.5em);
}
1 Like

Thank you so much @dodesz :heart: Now it looks great!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.