0

I have div that contains a long text, including other HTML markup (<h1>, <b>, etc). The div has the following css rule:

height: 100px; overflow: hidden;

Is there a jQuery function that gives me the part of the text that is overflowing the specified div bounds, so that I can append it to another div?

Anders
  • 8,307
  • 9
  • 56
  • 88
Wermerb
  • 1,039
  • 3
  • 15
  • 30

2 Answers2

0

You can calculate the number of characters that fit on a line and also easily calculate the number of lines that fit in the div (just devide the height by the font-size i think), check out this answer here -> How to count number of characters in a line using JavaScript

Community
  • 1
  • 1
Velimir Tchatchevsky
  • 2,812
  • 1
  • 16
  • 21
0

Maybe this solution will be interesting :D.
CSS3 multicolumn