Cut off the text before reading further
I have texts that fit in a div most of the time, but sometimes that doesn't fit. Can't figure out how many characters / words / paragraphs fit into the div, so I can't seem to turn that off.
The div had a fixed height and width, so what can we do about it? Or do you have some suggestion how to get everything in a div, the right way?
+2
a source to share
5 answers
If the text doesn't fit you can use css elipses to make it look a little cleaner. Maybe put your text in a hidden element and measure the height to see if you need to add a link (more).
See http://mattsnider.com/css/css-string-truncation-with-ellipsis/
+9
a source to share