Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 02-28-2006, 12:53 PM css for printing
bez
bez's Avatar
Skilled Talker

Posts: 53
Trades: 0
I have a page that displays 6 little tables, of varying height, in series down the page.

When I print the page, i want only to print *whole* tables. At the moment when i print the page the tables can be cut in half, going over two pages. Is there any way to force page breaks either side of tables?

Cheers for feedback.

Last edited by bez; 02-28-2006 at 01:12 PM..
bez is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-28-2006, 04:28 PM Re: css for printing
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
You could set up a different style sheet for printing. You would just need to use media="print" when calling the style sheet or within the head of the document.

It's probably going to take some scripting to determine where to stop printing and have a page break. You could use javascript to determine the y-coordinate of the top and bottom of the tables and if the table would cross where you want the page break to be you could insert some spacing above that table so it gets pushed down further on the page for printing.

As I'm thinking about this it might not be so trivial to set up the script, but I think it could all be set up with some basic dhtml, using javascript to find the table position and then modify the stylesheet for printing.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 03-01-2006, 03:44 AM Re: css for printing
bez
bez's Avatar
Skilled Talker

Posts: 53
Trades: 0
Yeah, i already have a print stylesheet, i was just hoping there would be some 'pagebreak' attibute i could stick in a div, which would make things simple.

Writing a javascript like you suggest sounds like a big headache, specially for somebody not much cop with the language (like me).
bez is offline
Reply With Quote
View Public Profile
 
Old 03-01-2006, 11:50 PM Re: css for printing
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
there is a page break CSS property, don't know which browsers support it....
http://www.w3schools.com/css/pr_print_pagebb.asp

EDIT: here's a compatibility chart: http://www.webmasterstop.com/118.html

Last edited by funkdaddu; 03-01-2006 at 11:53 PM..
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 03-02-2006, 12:38 AM Re: css for printing
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Hey that's a new property for me. Cool. Looks like it's only half safe for IE, but I've found a lot of things that are only supposed to be half safe work fine.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 03-02-2006, 04:34 AM Re: css for printing
bez
bez's Avatar
Skilled Talker

Posts: 53
Trades: 0
a half-working page break is better than none at all i guess, cheers!

The page is for my company intranet, and ive got everybody set up with ff 1.5, so its not that big an issue really.
bez is offline
Reply With Quote
View Public Profile
 
Old 03-02-2006, 01:28 PM Re: css for printing
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
If it is a specific page that people need to print. Why not just hard code it as a word doc and let them download it.
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Reply     « Reply to css for printing
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.91040 seconds with 12 queries