How to limit text characters?

how to limit text , paragraph characters ?

Unfortunately you can only limit the number of lines using CSS but not characters or words.

  1. Set line-height to use EM instead of PX. Example: 1.4em
  2. Set max-height to a multiple of that setting. Example: 2.8em or 4.2em
  3. Set overflow to hidden.

To limit by characters or words, use a JS lib.

5 Likes

you are my savior ! Haha thanks again !!

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