Solved

overflowed text in div goes to "next page"

Posted on 2008-10-10
4
276 Views
Last Modified: 2012-05-05
Hello,
I'm trying to create a div where overflowed text will be on the "next page". That is, I have a lot of text and I only want to view the text that fits nicely in the div, the extra text will automatically be seen by clicking on "next page" and it will show up. So if the text is really  long you would have to click 4 times on it to get to the end. This way no scroll bars.
0
Comment
Question by:johnwry
4 Comments
 
LVL 3

Expert Comment

by:DerkArts
ID: 22691810
What have you tried so far?
0
 

Author Comment

by:johnwry
ID: 22692350
ha, in all honesty, I have no idea where to begin. Don't know if it's css, javascript or a combination.
I imagine that i would have my html like this:

<div id="content">content goes here</div>

css:
#content {
height:200px;
overflow:none;

}

if "content goes here" is too long (more than 200px) then a link can be seen to take you to the next page (the rest of "content goes here").
0
 
LVL 4

Accepted Solution

by:
Lordgobbledegook earned 500 total points
ID: 22693017
You may wish to consider a fixed-width font (like Courier) so you will know exactly how many characters will fit on each line.  Based on your font size and line spacing you could then work out the number of lines (eg. 200px at 20px per line = 10 lines).

Then you can use PHP to work out what text to display on each page.  The tricky part might be any extra "rules" you implement such as paragraphs running over the page or just go to the next page, etc.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question