Click to See Complete Forum and Search --> : Format HTML for PRINTING


wardo
08-03-2005, 01:23 PM
I have a page that has 4 small tables that are dynamically made(asp). Which essentially means they wont always be the same size. The pages need to be designed to print, and I would like to make it so that if lets says the 2nd table wont quite fit below the 1st table on the first page that it would then start on the 2nd page instead. Basically I dont want tables to get split up. I know I couuuld have each start on it's own page using the (br clear=all style='page-break-after:always') tag but if they can fit i'd rather let them.

Thanks for any help. Moderator, feel free to move if you think this is poor forum selection.

wardo
08-04-2005, 09:00 AM
Really, any feedback of any kinda would be appreciated.

NogDog
08-04-2005, 09:24 AM
You might want to look at the "paged media" options for CSS:

http://www.w3.org/TR/CSS21/page.html

wardo
08-05-2005, 02:15 PM
NogDog, thanks for the link, it was def of use, however I haven't been able to solve the problem.

I know I can use page-break-before:always before each of my 4 tables, however I want them to be on the same page if it's possible. I tried using page-break-inside:avoid on a div tag that encapsulated the table. However, that did not work.

So basically they either all print one after another, and get split in half, or each starts on a new page. How can I fix this, so I print the 4 tables in as few pages as possible, without splitting them up?

Thanks in advance

NogDog
08-05-2005, 02:49 PM
I'm wondering if this would work?

table * {
page-break-before: avoid;
page-break-after: avoid;
}

wardo
08-05-2005, 04:10 PM
I'm wondering if this would work?

table * {
page-break-before: avoid;
page-break-after: avoid;
}


It did not, however i also set before as always, just to make sure the style was being applied, and it put EACH row on it's own page, which is weird cause when i did style="page-break-before: always" in the table tag it broke the whole table not each row, so I have NO idea what that happened but it's hardly relevant.

To anyone else reading this perhaps, you know of a place were page breaks and paged media or explained a little better the the previous link. I feel like they must be the solution, but I'm new to them and I haven't found any very clear sites with examples.

wardo
08-05-2005, 04:14 PM
might i need to set the page size, and margins???