Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 03-11-2007, 10:07 AM Splitting content?
Novice Talker

Posts: 7
Trades: 0
Hi,

anybody knows, if there's a way to split the HTML -page content automtically to pages. Like let's say that I have a div sized 400 x 300 px including just some text and it doesn't fit there and I don't want it to make any scrolls. In other words I just want it to create another page if the content grows too much, like for example over 500 chars. Does this make any sense? Thanks!
Hulio is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-11-2007, 02:54 PM Re: Splitting content?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
As far as I know, it's not possible and don't make much sense.
A web page is not a paper sheet.

I can understand what you are asking for this, but there is a problem with your thinking: your users.
A user might be visually challenged, and display the text with high contrast and 3000% zoom.
I worked with a secretary that had this disability.

In a more conventional way, what if a user configure his browser to have the fonts displayed 150%, because he finds more comfy to read ?

Another problem is that you cannot know what will be the size in pixels of a rendered text in your page.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 03-12-2007, 05:39 PM Re: Splitting content?
mad_willsy's Avatar
Super Spam Talker

Latest Blog Post:
R&R Catering Hire Testimonial
Posts: 805
Name: Will Craig
Location: Cheltenham, Gloucestershire, UK
Trades: 0
Of course its possible. I have done it before, you need seperate pages and I can't remember exactly, but I think it is an str_split() function you need... wordwrap() is also helpful for stopping the lower scrollbars.

eg.

$string = str_spilt($string, 500);
$arrayno = $page - 1;
echo $string[$arrayno];
$count = count($string);
$i = 1;
while($i <= $count)
{
if($page != $i)
{
echo "<a href=page.php?page=$i>Page $i</a> || ";
}
}

Theres your basics if i'm right in my function names (no time to google), would need some personalising...

If helpful PLEASE add to my talkupation!
__________________
Wont :P

Please login or register to view this content. Registration is FREE

Last edited by mad_willsy; 03-12-2007 at 05:48 PM..
mad_willsy is offline
Reply With Quote
View Public Profile Visit mad_willsy's homepage!
 
Old 03-12-2007, 06:12 PM Re: Splitting content?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Quote:
Originally Posted by mad_willsy View Post
Of course its possible. I have done it before, you need seperate pages and I can't remember exactly, but I think it is an str_split() function you need... wordwrap() is also helpful for stopping the lower scrollbars.
Only if you understand what you're talking about.

Of course it's not possible without resorting to extremes! You can use one letter per page, and no graphics anywhere. Then you can be more or less certain the bulk of people won't have to scroll. You can also be pretty certain no one will stay.

My laptop has 1024x768 pixels. My desktop has 1600x1200 pixels. Do you see the problem here? Either I'm forced to scroll on my laptop, or have a lot of wasted space on my desktop. Now let's go ahead and throw another wrinkle into your evil plan: I never use my browser window maximized. That's right, even if I have 1.9 million pixels on the screen, the browser doesn't get all of them!

CSS fluid layouts help some. But never having to scroll is an elusive goal that will turn you crazy. Give up now, while there's still time!
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Splitting content?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24569 seconds with 12 queries