Solved

overflowed text in div goes to "next page"

Posted on 2008-10-10
4
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSON help 8 48
display data from multiple ajax calls 9 42
Check for Numeric Phone Field 14 48
ajax post without refreshing whole page 10 16
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

739 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