To limit a paragraph to two lines with an ellipsis in Webflow and ensure a line height of 16px, you need to apply specific CSS properties using custom code.
two-line-ellipsis) so you can target it with custom code.
Webflow’s Style panel does not support line clamping natively, so you will need to apply custom CSS via the Page Settings > Custom Code area or via Embed component.
Add this CSS inside a <style> tag:
<style>
.two-line-ellipsis {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
<style> block there.
two-line-ellipsis class (or whatever name you assigned).
To show only two lines with an ellipsis in Webflow, set the paragraph’s line height to 16px in the Style panel and use a custom CSS rule with -webkit-line-clamp: 2. This allows truncation with “…” while maintaining your specified line spacing.