I am getting long text using ajax in json form I want to fill those content in the fix height div
suppose I have div height 500px and width 300px. and font size is 16px
i want any javascript recursive method that can fill data according to height and width of div and can return me remaining text.
if any one can do that then Please provide me solution.
Thanks in Advance
Why don’t just put all in the div and in the div you set
overflow=”hidden”
Create a temp div, fix it width and append text until it exceed your height then stop, after that copy all content to the main div