#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Location
    Billings, MT
    Posts
    2
    Rep 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
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Location
    Seattle WA
    Posts
    863
    Rep Power
    14
    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.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Location
    Billings, MT
    Posts
    2
    Rep 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
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    5
    Rep 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
  8. #5
  9. No Profile Picture
    :: cerebralshock ::
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    Everywhere & nowhere.
    Posts
    133
    Rep Power
    13
    @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.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    5
    Rep Power
    0

    Question 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.
  12. #7
  13. Senior Polecat
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Jersey (the original version)
    Posts
    210
    Rep Power
    12
    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
    Quidquid latine dictum sit, altum viditur.

    http://www.XSet.co.uk
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    5
    Rep Power
    0

    Cool Thanks...


    Thanks polecat

    That did the trick

    Good onya...

IMN logo majestic logo threadwatch logo seochat tools logo