RE: Page break in html table

Thanks for your reply though I couldn't get the style sheet to work. even
with the ways you suggested it still will break a cell and print part of the
cell on one page and the other on the next if the text wraps to more then
one line.  Do you know if the style sheet properties work when printing in
IE4.0? they seemed to only work with formating output to the screen (ie:
colors, fonts).  I couldn't get the ss to change page setup properties
either (ie: print landscape). if you have any ideas about this please let me
know.

Jay

> -----Original Message-----
> From:	Rasmus Kaj [SMTP:kaj@interbizz.se]
> Sent:	Tuesday, July 07, 1998 11:03 AM
> To:	Katonica, Jason
> Cc:	www-html@w3.org; kaj@interbizz.se
> Subject:	Re: Page break in html table
> 
> >>>>> "KJ" == Katonica, Jason <Jason.Katonica@ogs.state.ny.us> writes:
> 
>  KJ> I was wondering if anyone knows how to insert a page break into a
>  KJ> HTML table so that i can control what the print out of a table on
>  KJ> my web site looks like.  I want the table to be one continuous
>  KJ> table when viewed from the web browser (IE4) but i want to
>  KJ> control what parts get printed on seperate pages.  Maybe the
>  KJ> solution is to use a hidden character?  The main problem is that
>  KJ> when my table is printed it will page break in the middle of a
>  KJ> line of text.  Any help is greatly appreciated and thanks in
>  KJ> advance.
> 
> If you just want to avoid page-breaking 'in' table cells (i.e. put all 
> page breaks between table rows), you should include this in your
> stylesheet:
> 
> TR { page-break-inside: avoid; }
> 
> If you want to keep a number of rows together, put them in a colgroup
> and applyt the style to COLGROUP instead of TR. Example:
> 
> <style type="text/css">
> COLGROUP { page-break-inside: avoid; }
> </style>
> 
> <table>
>   <thead>
>     <tr> ... header line(s)
>   </thead>
>   <colgroup>
>     <tr> ... line 1
>     <tr> ... line 2
>   </colgroup>
>   <colgroup>
>     <tr> ... line 3
>     <tr> ... line 4
>   </colgroup>
> </table>
> 
> Here, line 1 and 2 should be kept on one page, and line 3 + 4 on one
> page. If there is a page break before line 3, the header line should
> be repeated on the new page.
> 
> Note, however, that this is only how I think it should work (after
> reading (parts of) the current HTML and CSS recomendations), I'm not
> sure if there are a browser (or postscript generator) that confirms to 
> this yet (I am about to start writing such a postscript generator, if
> I don't happen to stumble accross one instead, anyone on this list
> interested in taking part of this open-source, 'free' project?).
> 
> // Rasmus
> 
> -- 
> kaj@cityonline.se --------------- Rasmus Kaj - http://www.e.kth.se/~kaj/
>  \               CityOnLine IB Production AB - http://www.CityOnLine.se/
>   \------ You are responsible for any misinterpretation of your messages
> 

Received on Wednesday, 8 July 1998 13:36:31 UTC