The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
printing CSS Backgrounds
Discuss printing CSS Backgrounds in the CSS Help forum on Dev Shed. printing CSS Backgrounds Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

April 16th, 2003, 12:21 PM
|
|
Junior Member
|
|
Join Date: Apr 2003
Location: Billings, MT
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
printing CSS Backgrounds
Hello,
Is there any way I can force a CSS background-color to be included when the user prints the page? I'm using the background-color for highlighting purposes on invoices for our company, and our employees need to see the highlights when they are printed out. Thanks - Trevor Hartman
|

April 16th, 2003, 01:08 PM
|
|
Contributing User
|
|
Join Date: Jan 2002
Location: Seattle WA
Posts: 863
  
Time spent in forums: 22 sec
Reputation Power: 13
|
|
|
No, you can't. Background color printing is controlled completely by the client browser, your code has no effect on it. Just describe to the employees how to set their browser to print the background colors, and some may do so.
|

April 16th, 2003, 01:44 PM
|
|
Junior Member
|
|
Join Date: Apr 2003
Location: Billings, MT
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
thats what i thought
Ok, thats what I thought. Just checking to see if someone had an alterior solution. Thanks for your reply
Trevor
|

June 17th, 2003, 08:07 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 5
Time spent in forums: 4 m 11 sec
Reputation Power: 0
|
|
|
CSS Colour - Printer settings?
Hi there
I'm encountering the exact issue mentioned here. What browser primting-settings are refered to? I've tried playing with them without much success (using a non-colour printer...)
Thanks
|

June 17th, 2003, 09:02 AM
|
|
:: cerebralshock ::
|
|
Join Date: Aug 2002
Location: Everywhere & nowhere.
Posts: 133
Time spent in forums: 44 m 49 sec
Reputation Power: 11
|
|
|
@media print {
/* style sheet for print goes here */
}
embed this in your html and use it in conjunction with a javascript or php function to print the page. I haven't tried just using the print css and actually printing a page, so can't guarantee it.
|

June 17th, 2003, 09:45 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 5
Time spent in forums: 4 m 11 sec
Reputation Power: 0
|
|
Clarification
Hi there
Thanks for the response.
I'm familiar with @media (and it's other incarnations, the <LINK> attribute "media" etc...) but that merely applies the CSS to the page for printing. (Correct me if I'm wrong.) The default is to apply the CSS to printing.
However, even when the CSS is applied to printing, background colours (such as for <TD>'s) will not print. What browser setting will change this?
I tried without success in IE 6. Perhaps it's possible with other browsers.
|

June 17th, 2003, 12:54 PM
|
 |
Senior Polecat
|
|
Join Date: Jun 2003
Location: Jersey (the original version)
Posts: 210
Time spent in forums: 59 m 57 sec
Reputation Power: 10
|
|
|
in ie:
Tools > Internet Options > Advanced
The scroll down to just above security - you should see an option called "printing > print background colours and pictures" - check the box and bob's your mothers brother
|

June 18th, 2003, 06:44 AM
|
|
Registered User
|
|
Join Date: Jun 2003
Posts: 5
Time spent in forums: 4 m 11 sec
Reputation Power: 0
|
|
Thanks...
Thanks polecat
That did the trick
Good onya...
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|