Forum Moderators: open

Message Too Old, No Replies

Print [preview] issue with IE

Background colour goes invisible

         

blakpawn

11:51 am on Nov 8, 2005 (gmt 0)

10+ Year Member



Hi,

Please excuse me if this is a very easy question but I have a web page with some black text on a grey background, looks fine in the browser, but when I print preview it the background is white and when I print it it's also white. This is only a problem in IE, Netscape prints it fine. The page uses CSS not sure if this is relevant.

Any ideas on how to fix this would be appreciated thank you :-)

BlobFisk

12:05 pm on Nov 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, blakpawn!

Have you tried using a specific Print CSS file to force the background colour on print?

blakpawn

12:23 pm on Nov 8, 2005 (gmt 0)

10+ Year Member



Hi,

Thanks for your welcome.

I havent tried a specific media="print" css file, I was hoping to avoid having to write one of these for all of my pages. It seems that every background colour applied to a div class via css is ignored during print preview in IE6.

Can this really be true? And is there an easier solution than hand crafting a css file for every page on the site?

Hope so, many thanks for your efforts, blakpawn.

Robin_reala

12:56 pm on Nov 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tools / Internet Options / Advanced / Always Print Background Image and Colours

I believe this is unticked by default.

Regarding print stylesheets, you can embed print styles directly into your normal stylesheet by using an @media rule [w3.org]:

@media print {
body { font-size: 10pt }
}

blakpawn

1:43 pm on Nov 8, 2005 (gmt 0)

10+ Year Member



Ah brilliant ty Robin!

What a great default?! I didnt know it was even in the options.

But hey thats just what i needed to know.

Many thanks, Richard.