Is it possible to use css to shrink text to automatically fit the size of the div

You can try to use this code below

.poll-name {
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  display: block;
  line-height: 1em; /* a */
  max-height: 2em; /* a x number of line to show (ex : 2 line)  */
}

Cheers!

Leave a Comment