Limit title length on card

Hi,

Could you please give us a bit more detail about what happens when you add the snippet? This solution has been working well for other users, so we’d like to see if there might be a specific issue on your end that we can help sort out.

As for the block height issue, unfortunately there isn’t an easy way to resolve that since the content in each block can vary in height. But if it’s something you really need, you might want to consider hiring a freelancer who can customize this for you to get it working exactly how you want it: Customize your website | HivePress

thanks the answer above, and i do some adjustment of the solution, for my case, it can resize with window size.

.hp-listing--view-block .hp-listing__image {
    width: 100%;
    height: 28vh;
    overflow: hidden;
}

.hp-listing--view-block .hp-listing__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.hp-listing--view-block .hp-listing__title a {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp : 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
    height: 2.8em;
    line-height: 1.4em;
}
1 Like

Hello,
Thanks everyone! I fixed it.

2 Likes

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