Solved

overflowed text in div goes to "next page"

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

705 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now