CSS, Category Images and Category Page

Hi guys,

Is there a way to change via CSS the position of the category image on the Category Page?

Meaning, the image by default goes “to the left side” of the Category Name and tries to fulfill the height of both the Title and the Description of the Category. But on Mobile the image just siths there and I’m trying to put it either before or after the Category Title Text. But I just can’t seem to be able to do it.

Tried with category-text-title and category-logo aspect-image but I can’t seem to align them properly. I’m using the “Categories and Recent Topics” Style.

Thanks beforehand for any advice!

You can put the image before the category name on mobile by doing this in your theme’s mobile stylesheet:

.category-title-link {
  // this allows you to reorder the elements and forces them onto the same line
  display: flex; 
}

.category-text-title {
  // change the order of the title to come after the image
  order: 2; 
}

.categories-list .category .category-logo.aspect-image {
  // removes an extra margin from the image that's no longer needed
  margin-top: 0;
} 

2 Likes

Ten Million Thanks!

And even more thanks for the comments, this way is easier to learn. With this now I can try to solve how to Center that image on a different theme, thanks a lot!

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