Page Breaks in Printed Web Pages

orty

Golden Member
Nov 27, 2000
1,110
0
76
orty.com
OK, here's what I'm trying to do. I've got a real-estate listing database dump on a web site I'm working on. On the formatted page, each home is enclosed in a <table> tag (there's roughly 130 homes in the database). The problem is that when printing, sometime listings get split within the <table> tags (so we'll end up with the name of the home on one page, and the description for the home on the 2nd page, for example).

I know there are CSS2 tags that sort of accomplish page breaks, so I tried enclosing the table in a span tag like so:
<span style="page-break-inside: avoid">...</span>

However, it doesn't work in MSIE 6 or Mozilla beta 1.1.

Anybody have any other ideas on how to automatically break printed web pages? Is there any software that will do this?

To see the page I'm trying to nicely print, head here (may not look completely right, as it uses fonts we have in the office here so it prints nice on our printers):
http://www.sunrayinc.com/brochure_grab.php

Ideas?

-orty

 

joinT

Lifer
Jan 19, 2001
11,172
0
0
looks pretty good to me Orty (well, using IE 6 anyways)
#1. what db are you using? I assume you are querie'ing (sp?) using SQL.
If so, when you create the code to display the info in the DB, it will be much easier to make each "house" into it's own table (I think you've done that)
Then - in PHP, you create code that can display all the info about 1 DB entry.
Then you populate it with a SQL query that is selecting the info about ALL the house's.

It should then make each table one for each DB entry.

Truthfully - it looks ok - dunno if u fixed it already.
 

joinT

Lifer
Jan 19, 2001
11,172
0
0
oh yea - just change <table...... border=0> to border=1 to troubleshoot your tables.
Which browser are you using that gives the wrong output ?
 

orty

Golden Member
Nov 27, 2000
1,110
0
76
orty.com
it's rendering properly from the browser standpoint. However, it's when I print that I'd like to make sure it doesn't break the tables in half (try printing out the first 5 pages, and you'll see at least one home gets split between two pages).

The tables and such are rendering fine, it's using CSS2 (or something else?) to insert print breaks that I'd like to do. I don't even know if it's possible with today's browsers, as they don't support CSS2 very well.

-orty