Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

overflowed text in div goes to "next page"

Posted on 2008-10-10
4
Medium Priority
?
307 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

719 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