Page Breaks not working for table columns

C

Craig Taylor

For a print stylesheet I'm having some issues being able to print a
table so that all columns and all rows are printed visibly to the
printer.

For testing, I've created a table with 50 x 50 rows & columns to
ensure I should get pagination both vertically and horizontally.

Whenever I try to use the following CSS rule nothing happens:
TD {
page-break-before: always
}

(The always is just for testing purposes to make sure something is
really going on.)
If I change the TD to a TR then my table breaks on every line like it
should.

Thanks,

- Craig Taylor
 
J

Jukka K. Korpela

Scripsit Craig Taylor:
Whenever I try to use the following CSS rule nothing happens:
TD {
page-break-before: always
}

Maybe we shoudn't be surprised, since by CSS specs, the property applies to
block-level elements only.
If I change the TD to a TR then my table breaks on every line like it
should.

So why don't you do that? Why would you start a new page before a table cell
but not before the row to which the cell belongs.

TR isn't block-level either, so this is somewhat puzzling. Maybe we aren't
supposed to start a new page befoe a row. Maybe we should try putting a
block element inside a cell and assign the CSS rule to it.
 
C

Craig Taylor

Scripsit Craig Taylor:


Maybe we shoudn't be surprised, since by CSS specs, the property applies to
block-level elements only.


So why don't you do that? Why would you start a new page before a table cell
but not before the row to which the cell belongs.

The first paragraph of my message stated the reasons why: I have a
table which is bigger than print size both horizontally and
vertically.
TR isn't block-level either, so this is somewhat puzzling. Maybe we aren't
supposed to start a new page befoe a row. Maybe we should try putting a
block element inside a cell and assign the CSS rule to it.

So I've found out - The only work-arounds that I've been able to find
is to have a series of vertical tables aligned next to each other and
specify it to break before each table ... not the greatest way to do
it but untill CSS v10 comes out (joke) it'll have to do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,087
Latest member
JeremyMedl

Latest Threads

Top