Author |
Topic |
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 04 January 2008 : 12:24:23
|
Did I ever mention that I work at a place that has some sort of OCD obsession with paper? It amazes me the number of things that "must get printed" that are easily available on our intranet site.
Anyway, I'm working on one of those "must be printed" things and I'm trying to get it to be just a little "neater" than it sits now. At least the functional part wasn't a pain...
We have an online system for showing what classroom classes are available. Now they want a printable list of all the classes that are coming up in the "next month or two". I've got the page written, but I'm getting odd page breaks. Its nothing unexpected, but I'd like to clean it up a little. Unfortunately I don't seem to be having much luck with "page-break-inside:avoid;" (reference).
Any ideas? |
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 04 January 2008 : 15:35:37
|
On reflection, I probably should have clarified a couple of things...
This page lists out all the classes, sorted by date and start time, for a specified period of time (measured in months). A table is written for each day, detailing the classes for that day. I'm trying to keep the tables intact and force the page breaks to be between the tables.
I started by adding 'style=""page-break-inside:avoid;""' to the table tag for each table, then tried enclosing the tables in a <div>, and it seems that both IE7 and Fx2 will orphan part of the table when you go to print the page ... which is what I'm trying to stop. |
|
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 04 January 2008 : 16:40:58
|
Have you tried using page-break-before or page-break-after? I haven't delved too deeply into printing stylesheets, as pretty much all of my sites are meant for online viewing only, but those look like they could be alternatives to page-break-inside. According to this site, they are supported by IE6+/FX/NS6+.
Good luck, and post back when/if you find something that works. I have a feeling this is something I'll need eventually. |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 04 January 2008 : 16:43:31
|
I've used 'page-break-before' in a different area of the site, but its not the easiest trying to figure out how far out to put it so I don't end up with 30 pages on a one month list.
Fortunately this is an "icing on the cake" feature, so if I don't get it to work, its no big deal. |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 04 January 2008 : 18:06:38
|
<sigh />
After much googling, it seems that neither IE nor Fx support the "page-break-inside" - at the moment its just not worth trying to figure out how often to insert a page-break-before or page-break-after to make it look right. |
|
|
|
Topic |
|