Css pages and page breaks

This is a discussion on "Css pages and page breaks" within the Web Page Design section. This forum, and the thread "Css pages and page breaks are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 12th, 2005, 13:29
New Member
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Css pages and page breaks

Hi.. First time user to this forum.. Usually I use orafans (oracle) and linuxquestions forums.. Anyway.. Startet a bit with css now, and thought this might be the forum for it.

I have to make some reports from database text, so I have made up some blocks. Basically I have
[header text] - block 1
[information] - block 2
[text section nr.1 - 1 line to 60 lines long] - block 3
[table 1 - can be 1 to 120 rows long] - block 4
[text section nr.2 - 1 line to 60 lines long] - block 5
[table 2 - can be 1 to 120 rows long] - block 6

I do not know if the user will print the report on A1, A2, A3, A4 or A5 paper, or the american "letter" format for that matter.

Basically I want a page break so that the blocks do not split up. If all blocks can fit on a page, fine, let em do that, but I do not want the blocks split up i the middle. That makes em hard for the user to read since it is a lot of info, usually in tiny writting... If I used <p style = "page-break-after:always "> code I might have ended up with reports that where on one line each page... that is not desirable either, and waste paper.

So far I have fixed it by making a table for each block which has a fake empty rowspan="999" table column first in the tables making up the block. Using following code:
Code: Select all
<style>TR { page-break-inside: avoid; }
COLGROUP { page-break-inside: avoid; }
</style>
<body>
<table>
<colgroup>           /* starting an empty fake very long column here */
<tr>                     /* just to prevent table from splitting over 2 pages */
<td rowspan="999">  
</td></tr>
/* real data, making up a block */
<tr><td> data 1 (database data) </td></tr>
<tr><td> data 2 (database data) </td></tr>
etc etc
</colgroup>
</table>
/* second table - that might be split on 2 pages if the first table is long enough */
<table>
<colgroup>           /* starting an empty fake very long column here */
<tr>                     /* just to prevent table from splitting over 2 pages */
<td rowspan="999">  
</td></tr>
/* real data, making up a block */
<tr><td> data 1 (database data) </td></tr>
<tr><td> data 2 (database data) </td></tr>
etc etc
</colgroup>
</table>
This doesn't work with IE 6.0.28, nor netscape 7.1 but works with firefox 1.0 so I have hope it will work with the others in the not so far future.

So to the question: Is it a better way of doing this, that works today, and with most browsers. I don't really care if it is done using css or html, as long as it works (nor does my bosses). 95 % of my workplace use IE so a IE only solution would also be acceptable.

Guess I could go to the IT department and ask em to install firefox on all machines... but they probably never will...

Is it a no page break command for tables in html maybe?

Hope you can help.
Reply With Quote

Reply

Tags
css, pages, page, breaks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript menu - does not work on title page, but does work on other pages Crystal Phoenix Starting Out 4 Mar 24th, 2008 19:40
loading pages up with ftp and the index.html page wemz Starting Out 5 Sep 10th, 2007 21:54
Making all pages repeat the design of the home page DennisK Web Page Design 19 Nov 17th, 2006 14:50
Fetching files/pages from one 'template' page The Hick Man PHP Forum 2 Feb 25th, 2006 16:23
Table Column Headings and Page Breaks Trebz Web Page Design 8 Jun 4th, 2004 12:55


All times are GMT. The time now is 21:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43