eWorld.UI - Matt Hawley

Ramblings of Matt

Page Breaks in Web Pages

June 10, 2004 04:34 by matthaw

How many of you have ever had to make some webpages that have page breaks. (Raising Hand!)

Ahh, I see a lot of you have raised your hand...now, keep you hand up if you've never known how to do this. (Still Raising Hand!)

Uhh huh, still a lot of you I see. Well, worry no more. As I was printing off my vouchers for our upcoming vacation to Florida, I noticed that the page broke at specified areas for printing. So, like a normal interested developer, I had to do a "View -> Source" to see how they did it...are you ready for it?

<DIV HEIGHT=6 STYLE="page-break-after:always">&nbsp;</DIV>

Simple, isn't it. Now, I'm wondering how supported this is across different browsers...

PS - you can put your hands down, you're starting to stink up the blogosphere  ...



Categories: General
Actions: E-mail | Permalink | Comments (5) | Comment RSSRSS comment feed

Comments

June 10. 2004 06:04

Hi Matt, it's supported by: IE4, Nestcape 7, Opera 3.5.



See: www.blooberry.com/.../pbafter.htm">www.blooberry.com/.../pbafter.htm

William Luu

June 10. 2004 06:54

Thanks William! I guess it has been around for quite awhile, I just didn't have the urgency to actually go searching for it for a project...now I can actually use it!

Matt Hawley

June 10. 2004 07:02

YOu can put the style attribute in a <BR> tag as well.

M. Keith Warren

June 10. 2004 07:25

or better yet, give it a class and display it only on printed pages in your css.

rick

June 10. 2004 10:30

A similar feature, but much more useful (IMHO) is the display:table-header-group and display:table-footer-group, which prints the header or footer (respectively) of a table at the top or bottom (respectively) of each page, when the table spans across multiple printed pages.



AFAIK, this feature is supported only in IE (4+).

Memi Lavi

Comments are closed

Copyright © 2000 - 2022 , Excentrics World