Streaming live at 10am (PST)

How to limit text characters?


#1

how to limit text , paragraph characters ?


#2

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.


#3

you are my savior ! Haha thanks again !!


#4

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