Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 08-26-2008, 09:51 PM   #1 (permalink)
New Member
 
expatCanuck's Avatar
 
Join Date: Jul 2008
Posts: 4
Default print.css file to omit background ??

Greetings -

My site (link in signature) has a slightly complex structure -- 7 areas over a background image, and the background resizes to fit the browser size.

What I'd like to do is create a print.css file that omits the background image when the site is printed.

Can anyone provide sample stub code or point me to a useful tutorial?

And where is the print.css file supposed to reside? public_html? public_html/style? wherever the relevant .htm file is?

Thanks kindly.

- Richard
__________________
http://oldwithoutmoney.com

Last edited by expatCanuck; 08-26-2008 at 09:57 PM.
expatCanuck is offline   Reply With Quote
Old 10-20-2008, 12:55 AM   #2 (permalink)
Moderator
 
jnjc's Avatar
 
Join Date: Jun 2008
Posts: 365
Default

Two points:

1) I don't think you'll have to do anything to achieve this, I have a feeling that most browsers won't print background images anyway (I haven't test this in a while so I am not 100% sure).

2) use the "media" parameter like this:
Code:
<link rel="stylesheet"  type="text/css"  href="print.css"  media="print" />
This specifies that the .css is only for print, put this after your normal .css

HTH,
JC
jnjc is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


All times are GMT. The time now is 02:53 AM.


Computer Forum - TechZine - Webpage Design

 
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.