Solved

overflowed text in div goes to "next page"

Posted on 2008-10-10
4
284 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

765 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