• Resolved newhere10

    (@newhere10)


    When the product title/description is longer than a line the price is shifting down.

    I am not sure what to do to fix this problem. Do I need to change the margin of the title or the price? I would like the price to be aligned for all products.

    Thank you

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • I should set the product title to a height for two lines:

    .woocommerce-loop-product__title {
      min-height: 40px;
    }

    and trim the four line title down to two lines.

    Thread Starter newhere10

    (@newhere10)

    Thank you. It works but then the products that have a shorter description have a large gap between the title and price. Is there another option? Can it be something that changes based on the title length?

    I think you need to choose betweem either a large gap on some products so the prices can be inline, or you have a smaller gap and the prices will not be in-line. Can’t do both.

    I should edit the four line title down to two.

    You could reduce the gap between the bottom of the title element and the top of the price with:

    .woocommerce-loop-product__title {
      min-height: 40px;
      margin-bottom: 0 !important;
    }
    .woocommerce ul.products li.product .button,
    .woocommerce-page ul.products li.product .button {
      margin: 0 !important;
    }
    Thread Starter newhere10

    (@newhere10)

    I prefer to have the prices inline and I can live with the large gaps for now.

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Product price shifting when product title is long’ is closed to new replies.