473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

No background colors on print stylesheet

I have a set of pages with a special stylesheet used to override some
styles for printing. One of the things I've tried to do is reverse
the colors of my navigation. On the screen, I have a black background
and the navigation is red on yellow. For print, I (obviously) have a
white background and wanted the navigation to be reversed (yellow on
red) for better clarity.

I've done print preview in IE 6, Opera 7.5, and Netscape 7.1 (all
Windows) and see the text is yellow and the background is completely
absent. Does the "print" media not recognize background colors?

You can find a page here:

http://home.hiwaay.net/~lkseitz/cvg/pmf2/index.shtml

and the stylesheets here:

http://home.hiwaay.net/~lkseitz/cvg/pmf2/pmf.css (media="all")
http://home.hiwaay.net/~lkseitz/cvg/pmf2/print.css (media="print")

I'm aware the HTML doesn't quite validate, but the problems are from
the Nedstat code at the bottom of the page that I can't modify too
much if I want it to work. It should have no bearing on the
navigation areas.

--
lkseitz (Lee K. Seitz) .at. hiwaay @dot@ net
"There are obviously many people who prefer one brand of bulls**t to
another, but I am not among them."
-- Tom Lehrer on whether he has a religious preference
Jul 20 '05 #1
5 4618
Lee K. Seitz wrote:
I have a set of pages with a special stylesheet used to override some
styles for printing. One of the things I've tried to do is reverse
the colors of my navigation. On the screen, I have a black background
and the navigation is red on yellow. For print, I (obviously) have a
white background and wanted the navigation to be reversed (yellow on
red) for better clarity.

I've done print preview in IE 6, Opera 7.5, and Netscape 7.1 (all
Windows) and see the text is yellow and the background is completely
absent. Does the "print" media not recognize background colors?


Yes it does. But perhaps you set your browser not to print backgrounds
colors.
Matthias

Jul 20 '05 #2
lkseitz (Lee K. Seitz) .at. hiwaay @dot@ net wrote:
I have a set of pages with a special stylesheet used to override some
styles for printing. One of the things I've tried to do is reverse
the colors of my navigation. On the screen, I have a black background
and the navigation is red on yellow. For print, I (obviously) have a
white background and wanted the navigation to be reversed (yellow on
red) for better clarity.
Why do you want your navigation to print at all? I've never been able
to click on a link on a print out and have anything happen. :-(
I've done print preview in IE 6, Opera 7.5, and Netscape 7.1 (all
Windows) and see the text is yellow and the background is completely
absent. Does the "print" media not recognize background colors?


Most browsers have an option to "print background colours", and most
browsers have this option set to off by default.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3
In article <2h************@uni-berlin.de>,
Matthias Gutfeldt <sa************@gmx.net> wrote:
Lee K. Seitz wrote:
I've done print preview in IE 6, Opera 7.5, and Netscape 7.1 (all
Windows) and see the text is yellow and the background is completely
absent. Does the "print" media not recognize background colors?


Yes it does. But perhaps you set your browser not to print backgrounds
colors.


Bingo! Additional reading revealed this. Apparently I'd configured
it to do so at home and forgotten about it. The browsers above are
just recently installed on a new computer and have not had most of the
preferences set yet. Thanks.

I may just do away with the navigation on the printed version
entirely. I guess there's no logical reason to leave it there.

--
lkseitz (Lee K. Seitz) .at. hiwaay @dot@ net
This quote appears by decree of Michael D. Hensley:
"But I'm not in anyone's .sig."
-- Vicki Robinson
Jul 20 '05 #4
Lee K. Seitz wrote:

I may just do away with the navigation on the printed version
entirely. I guess there's no logical reason to leave it there.


Generally yes, there's no point to it. But there might be situations
where it's useful to have a "TOC" on the paper printout, as a reminder
to the reader that there's additional information available (OK, so the
smart reader will remember that, but hey, I'm not smart...).
Matthias

Jul 20 '05 #5
Lee K. Seitz) .at. hiwaay @dot@ net wrote:
I have a set of pages with a special stylesheet used to override some
styles for printing. One of the things I've tried to do is reverse
the colors of my navigation. On the screen, I have a black background
and the navigation is red on yellow. For print, I (obviously) have a
white background and wanted the navigation to be reversed (yellow on
red) for better clarity.

I've done print preview in IE 6, Opera 7.5, and Netscape 7.1 (all
Windows) and see the text is yellow and the background is completely
absent. Does the "print" media not recognize background colors?


E.g. IExplorer may ignore your background set in the print CSS. That's
a default setting to save ink I guess...

--
Google Blogoscoped
http://blog.outer-court.com
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Scott | last post by:
There is a setting in IE for "Print background colors and images." I've noticed that without checking this option, a web page will print CSS lines between table rows, but a background color of...
3
by: Felix Natter | last post by:
hi, is there a way (html/css/javascript) to force IE to print background-colors exactly as specified in html/stylesheets? I tried to use @media print { ... } to override IE's "print background...
25
by: Neal | last post by:
According to the CSS lint at http://htmlhelp.org/tools/csscheck/, "The shorthand background property is more widely supported than background-color." Can anyone point me to, or provide, information...
3
by: Vam | last post by:
Hi, My program makes an HTML report which needs to be easily printable. On this report is a table, and one of the columns in the table needs to express a color. I've done this by setting the...
16
by: J. B. Moreno | last post by:
I read the faq, and it mentions that IE 4 on windows requires setting a printing option to allow background colors to be printed. Things change, life goes on, other browsers come into...
6
by: Mark | last post by:
Hello all - I'm trying to incorporate a stylesheet into an ASP.Net page but everytime I include the "LINK" code to the .css file in the HEADER location of the HTML code, the background color that...
4
by: Lachlan Hunt | last post by:
Hi, I'm looking for an interoperable method of determining the current background colour of an element that is set using an external stylesheet. I've tried: elmt.style.backgroundColor; but...
10
by: Bob Bedford | last post by:
I've a table in wich I've this CSS: ..oddrow{background-color:#FFFFFF} ..evenrow{background-color:#CCCCCC} The oddrows are white and the even are grey. BUT ! when I do print the table,...
4
by: devphylosoff | last post by:
hi folks I am looking for a tool (script, plugin, code, ...) which can generate background image for webpage look at background on http://vtorrent.info/ page or on the Vista webpage. I want...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.