Click here to Skip to main content
15,896,915 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
How to divide a div containing 1000 lines of text into sub divs of a specified height.
Posted
Comments
Sergey Alexandrovich Kryukov 26-Mar-14 11:38am    
Why? It cannot help to add structure to your text. And what is the "line of text" in HTML? There is no such thing. The whole idea is bad.
—SA
kuladeeprahul 26-Mar-14 12:34pm    
The div is loading data dynamically. I want to display it in pages. So I am splitting it. Can u help me in that?
Sergey Alexandrovich Kryukov 26-Mar-14 12:38pm    
I understand that. But it does not make you approach sensible. Please see my answer.
—SA

1 solution

Bad idea. Please see my comment to the question.

And there is no such concept as "line of text" in HTML. From the standpoint of HTML, all the lines in source HTML are merged together, all end-of-line characters are merged to a single blank space, all combinations of tabs, end-of-line characters and spaces are merged to a single blank space.

Text should be structured logically and semantically, depending on its content. No technical tricks can make big solid piece of text more structured or more readable.

—SA
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 26-Mar-14 15:00pm    
You still did not respond to my note: you don't define what is "line". Of course you can manipulate text the way you want, but the whole idea is wrong. Why it is not structured in first place where you generate text? Do you have any processing on the server side? If it accepts some data from some data source, I assume you do. Why are you not mentioning that? Of course you can manipulate text the way you want, either on server side or by Javascript, but how it could be a problem? If you knew how do you want to have the text you would do it by yourself.
—SA
Sergey Alexandrovich Kryukov 27-Mar-14 10:22am    
You still did not respond to my note: you don't define what is "line"...
—SA
Sergey Alexandrovich Kryukov 27-Mar-14 11:37am    
Wrong. The actual "lines" will depend on the size of the window.
You still did not properly respond to my note: you don't define what is "line"...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900