OsakaWebbie
Programmer
For background on this issue, see thread215-1220895. Ever since that thread, several times a week, I have been manually editing multi-page handouts with a special "edit" functionality I wrote - first I view the Print Preview, then open my edit screen and manually adding page/column breaks and blank lines, go back to Print Preview to see how the following pages flow, edit some more, etc. There has to be a better way!
Now that IE7 and FF3 are out, I had renewed hope that the value of "avoid" for CSS properties of page-break-before/inside/after would be honored by newer browsers (especially FF, as it is my favorite, and implements a multi-column layout I often use for this content). But alas, it would appear that nothing has changed - only Opera seems to give a hoot about controlling this aspect of printing. And it still amazes me that there are lots of tutorial pages about CSS that talk of the page-break properties as if they were fully supported. Have they tested what they are teaching?
Anyway, the reason I'm writing is to ask again if there is another clever solution. My content is quite dynamic, from a database of songs, with varying amounts of info and in varying font sizes and such. I want to prevent any given phrase or verse of a song to be split between pages (or even worse, a title on one page and the lyrics on the next). Here is a demo page (just a single hymn repeated, a silly but effective example) with code that works in Opera but not in FF or IE, so you can see the issue. Does anyone have any creative ideas of how I could format such content so that it keeps the sections together, taking a whole section to the next page if it doesn't fit on the current one? I can predefine the paper size and margins if necessary, if that would help in making, for example, some sort of Javascript routine that ran through the content and calculated what fits on each page somehow. It's been two years since I last stumped the forum with this one - any new ideas out there?
Now that IE7 and FF3 are out, I had renewed hope that the value of "avoid" for CSS properties of page-break-before/inside/after would be honored by newer browsers (especially FF, as it is my favorite, and implements a multi-column layout I often use for this content). But alas, it would appear that nothing has changed - only Opera seems to give a hoot about controlling this aspect of printing. And it still amazes me that there are lots of tutorial pages about CSS that talk of the page-break properties as if they were fully supported. Have they tested what they are teaching?
Anyway, the reason I'm writing is to ask again if there is another clever solution. My content is quite dynamic, from a database of songs, with varying amounts of info and in varying font sizes and such. I want to prevent any given phrase or verse of a song to be split between pages (or even worse, a title on one page and the lyrics on the next). Here is a demo page (just a single hymn repeated, a silly but effective example) with code that works in Opera but not in FF or IE, so you can see the issue. Does anyone have any creative ideas of how I could format such content so that it keeps the sections together, taking a whole section to the next page if it doesn't fit on the current one? I can predefine the paper size and margins if necessary, if that would help in making, for example, some sort of Javascript routine that ran through the content and calculated what fits on each page somehow. It's been two years since I last stumped the forum with this one - any new ideas out there?