Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-24-2009, 02:25 PM   PM User | #1
vinoman2
New Coder

 
Join Date: Sep 2008
Location: Portland, OR
Posts: 82
Thanks: 1
Thanked 0 Times in 0 Posts
vinoman2 is an unknown quantity at this point
How to print whole page

I have a one page website: http://davespchelp.com
I would like to print it to use as a flyer.

What is needed in html/css so I can print the whole page with colors and all?
vinoman2 is offline   Reply With Quote
Old 02-24-2009, 03:14 PM   PM User | #2
vinoman2
New Coder

 
Join Date: Sep 2008
Location: Portland, OR
Posts: 82
Thanks: 1
Thanked 0 Times in 0 Posts
vinoman2 is an unknown quantity at this point
I was able to add this print link:
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="style.css" media="print" />

Then I was able to in firefox go to Print > Options and check off colors and background so I was able to print the complete webpage for make copies.
vinoman2 is offline   Reply With Quote
Old 02-24-2009, 03:53 PM   PM User | #3
effpeetee
Senior Coder

 
effpeetee's Avatar
 
Join Date: Feb 2007
Location: Clapham Junction - London SW
Posts: 4,884
Thanks: 228
Thanked 204 Times in 203 Posts
effpeetee is an unknown quantity at this point
How about this

or this.

Frank
__________________
* Sources (updated: 21.11.2012.
Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.
effpeetee is offline   Reply With Quote
Old 02-24-2009, 04:18 PM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,699
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by vinoman2 View Post
I was able to add this print link:
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="style.css" media="print" />

Then I was able to in firefox go to Print > Options and check off colors and background so I was able to print the complete webpage for make copies.
vinoman, you should be aware that screen layouts are not print layouts. You can and should create a different print stylesheet where you hide all the unnecessary stuff like navigation links etc. (people can’t click links on a piece of paper).

In your current case it’s not that much of an issue because your page is very simple but also be aware that print layouts should be created with the same usability thoughts in mind as screen layouts. Therefore you should keep sizes (especially page measures) flexible, don’t set a fixed size. Be aware that images and colors aren’t necessarily being printed and floats and positioning can lead to problems with page breaks. And also be aware that different browsers also render print layouts differently as they do with screen layouts.

I happened to create the print stylesheets for the ProStores website and if you look at this page and do a print preview you’ll notice how the header navigation and the right sidebar are not being printed because that’s useless information if people print the page. They aren’t interested in the navigation, they want the main info. And you might also notice how the signup buttons are hidden in the print layout because that’s also irrelevant for the printed document.

So, for your print layout it’s enough to display the page title (text only), the main text, the contact info, and maybe the footer, too.
Read this article in A List Apart for more info on print stylesheets: http://alistapart.com/articles/goingtoprint/
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 12:07 PM.


Advertisement
Log in to turn off these ads.