0

Is it possible to limit a text length to “n” lines using CSS (or cut it when overflows vertically).

text-overflow: ellipsis; only works for 1 line text.

original text:

  • Ultrices natoque mus mattis, aliquam, cras in pellentesque
    tincidunt elit purus lectus, vel ut aliquet, elementum nunc
    nunc rhoncus placerat urna! Sit est sed! Ut penatibus turpis
    mus tincidunt! Dapibus sed aenean, magna sagittis, lorem velit

wanted output (2 lines):

  • Ultrices natoque mus mattis, aliquam, cras in pellentesque
    tincidunt elit purus lectus, vel ut aliquet, elementum…
Question is closed for new answers.
Changed status to publish