Solved Templates

Character count

Asked by Fabrizio 3 years ago Last activity 3 years ago

Hi,

I am working on the Educon template. In the "Academy" version of the home page in the "Latest News" section, I would like a character count to be applied to the news title as well and not only to the intro text, so that the title does not exceed one line. See the screenshot here: https://tinyurl.com/6366h73b

Can you help?
Thanks

Accepted answer

Marked as the solution

3 more replies

Rashida Rahman Staff

Hi there!

Thanks for your query.

There is no default option to achieve this. But you may try the following code in your custom CSS:

.sppb-addon-articles .sppb-addon-article .sppb-article-info-wrap h3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

Note: Path towards custom CSS(Joomla 4): System>Site Templates Styles> Click on your current default template name then choose Template Options. Then find custom CSS within the custom code.

https://prnt.sc/5mBuSRh907N3

https://prnt.sc/ooiq-lkMEXr_

https://prnt.sc/nunlX-f5AhK1

Best Regards

Fabrizio Asked this

Thanks Rashida, it works perfectly fine! Could you also tell me what code is responsible for truncating the intro text? Is it a css declaration?

Rashida Rahman Staff

Thanks for accepting the answer. Have a nice day!

Log in to reply.