Is there a reason this can't be solved with a CSS background-repeat: repeat-y; ? Or is download time of individual pages an issue?
This is really a client-side issue. The math is going to vary depending on each user's settings- which font is used, the size of the font, random browser stupidity, etc. Even if you try to specify such things, you'll have issues. If you try to use a specific font, what if the user doesn't have it? What if they have vision problems and have ordered fonts to be larger than usual? IMHO it would be better to just use CSS and put everything on the same page On Wednesday 30 July 2003 07:06 pm, [EMAIL PROTECTED] wrote: > maybe somehow with a substr function that gets the position of the last > paragraph ?? > > > ok let me explain , its straight up text content from the database , > > say its scrolls for ages , i need to split it into pages , so i get the > > length of the string up to the last paragraph which fits i need to > > split it there any idea ? > > > >> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > >> > >> on Wednesday, July 30, 2003 6:35 PM said: > >>> hi there , i have an issue trying to split content into pages , we > >>> have a popup with content and a background image with a set height , > >>> when there is more content the background repeats , theoretically i'd > >>> want to split the content into pages after a given length or line > >>> length or where it meets the background image height how can i do > >>> this ? > >> > >> This can be easy. > >> > >> 1. Make sure the content does not adjust itself based on the size of > >> the browser window. That is to say that the space that contains the > >> content should be a fixed width. > >> > >> 2. Then you need to calculate how many words you can legitimately fit > >> into this fixed space without going over. > >> > >> If you 150 words will fit in the space but go right up to the very > >> edge and are almost spilling into a new "page" you should pull the > >> number of words back to 120 or something to try and make sure that the > >> text will not spill over. > >> > >> You can be more precise if you use a fixed width font like Courier > >> New. If you use a variable width font (not sure if that is the > >> technical term) you'll have to do a little more guessing because 10 > >> i's are not the same width as 10 w's. > >> > >> > >> hth, > >> chris. > >> > >> p.s. There is no space before a comma! > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php -- Status: 0 Content-type: text/html [cgi] "To be true to the mythical conception of a God is to be false to the interests of mankind." -E. Haldeman-Julius -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php