Product title in line - by Bruno - on WordPress WooCommerce support

This topic has 4 replies, 2 voices, and was last updated 4 years, 8 months ago ago by Olga Barlow

  • Avatar: Bruno
    Bruno
    Participant
    April 19, 2021 at 20:41

    As the product title string length varies, the Price and Add to Cart buttons display at differing heights.

    Is there a way to make sure they are in line?

    Many thanks

    3 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Participant
    April 20, 2021 at 14:36

    Hello,

    There are 2 workarounds:
    1) Limit the title length
    2) Set the title min-height and then you will have some empty space for products that have one line of the product title instead of 2 or 3.

    Which way is more suitable for you?
    Provide us with link to your shop, please.

    Regards

    Avatar: Bruno
    Bruno
    Participant
    April 20, 2021 at 18:07

    Thank you, I used the code below and it worked – is that correct?

    .content-product .product-title {
    min-height: 40px;
    line-height: 1.3rem;
    }

    Thanks,

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    April 20, 2021 at 20:06

    Hello,

    It would be better to use

    .content-product .product-title {
    min-height: 5ex;
    line-height: 2.5ex !important;
    }

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘Product title in line’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.