Page Breaks in Printed Web Pages

liunx

Guest
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). <br />
<br />
I know there are CSS2 tags that sort of accomplish page breaks, so I tried enclosing the table in a span tag like so:<br />
<span style="page-break-inside: avoid">...</span><br />
<br />
However, it doesn't work in MSIE 6 or Mozilla beta 1.1.<br />
<br />
Anybody have any other ideas on how to automatically break printed web pages around certain elements, so it doesn't break my table in half? Is there any software that will do this?<br />
<br />
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):<br />
<!-- m --><a class="postlink" href="http://www.sunrayinc.com/brochure_grab.php">http://www.sunrayinc.com/brochure_grab.php</a><!-- m --><br />
<br />
Ideas?<br />
<br />
-orty<!--content-->I wouldn't use span tags. use div tags instead.<br />
<br />
here is some reading material<br />
<br />
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=11201&highlight=print">http://www.htmlforums.com/showthread.ph ... ight=print</a><!-- m --><br />
<br />
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=8059&highlight=print">http://www.htmlforums.com/showthread.ph ... ight=print</a><!-- m --><br />
<br />
<br />
and do you guys have a lot of smoke up there?<!--content-->The smoke isn't too bad, actually. We're right in the middle of a bunch of fires, but the smoke's pretty minimal right now...it'll probably thicken up this evening (usually does). <br />
<br />
I'll check out the print tutorial. Thanks (I'm new to the site, so sorry I didn't find that first :-).<br />
<br />
-orty<!--content-->yeah figured you were. the smoke from the one down in Medford is not too bad anymore. haven't heard about our fire in a couple of days. seems to be going around the vally which is good.<br />
<br />
that's ok if you didn't look first, it seems to be a buggy attribute anyway.<!--content-->Originally posted by scoutt <br />
I wouldn't use span tags.<br />
Yep, don't use them to enclose a block-level element (like a <table>, however they are useful in other ways):<br />
<br />
No CSS:<br />
<p>Introduction<br /><br />
This is my introductory paragraph</p><br />
<br />
With CSS:<br />
<p><span class="Heading">Introduction</span></br /><br />
This is my introductory paragraph</p><br />
<br />
W3C HTML 4 promotes the use of both the <div> and <span> tags (<div>'s are for block-level elements).<br />
<br />
I would add "don't use CSS2". Browsers can hardly agree on CSS1 support, CSS2 is very poorly supported across all browsers.<!--content-->Originally posted by torrent <br />
I would add "don't use CSS2". Browsers can hardly agree on CSS1 support, CSS2 is very poorly supported across all browsers. <br />
<br />
Right...the web address above isn't going to be a public address. I'm only going to use it for internal use, so we'd use a browser that supports it to make it work. Otherwise, I wouldn't be using CSS2 to make this work.<br />
<br />
I'll just have to play to see what works, but thanks for the tips.<br />
-orty<!--content-->
 
Back
Top