javascript - How to remove ellipsis if element isn't wide enough -
i have html element has css properties of text-overflow: ellipsis
, overflow: hidden
. these work great in truncating text when it's wider width of div it's in , displaying ellipsis. however, if div resized smaller point ellipsis shown (or when it's small can't show ellipsis , reverts 1 character of text), want remove ellipsis altogether , not display anything. possible?
i don't want have check width of text seems hackish. i'd prefer cleaner.
Comments
Post a Comment