Viewing 4 replies - 1 through 4 (of 4 total)
  • Try

    h2.woocommerce-loop-category__title {
        text-align: center;
        margin: 0;
    }
    Thread Starter popos93

    (@popos93)

    Thanks a lot, this code seems to align the text to the center of the page and not under the photo. However, I found this solution somewhere else:

    li.product-category.product{
         display: flex;
        align-items: center;
        justify-content: center;
    }
    h2.woocommerce-loop-category__title {
        text-align: center;
    }

    Although this is not perfect either, because with longer text, the photo now seems aligned to the left

    • This reply was modified 4 years, 4 months ago by popos93.

    ok, cool. To remedy the longer text aligning to the left, try

    li.product-category.product a{display: flex;
        flex-direction: column;
        align-items: center;
    }
    Thread Starter popos93

    (@popos93)

    This worked like a charm, thank you very much for your help! I also have another very annoying issue, but I’ll open a separate thread just to keep things clean. I’ll tag you in there maybe you can give your opinion :D.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Center text under category photo’ is closed to new replies.