Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Background Color in Table Does Not Print

Posted on 2003-11-27
6
384 Views
Last Modified: 2008-03-10
Hello,

Thanks for looking at this question.  We have a table that many times people would like to print.  The colors in the cells help to keep the info straight, however, when people print, the background color fails to print, just the table itself.  Is there anyway to configure or set the page/table so that the background color in the cells/table also prints?

Many thanks,

Yunkaa
0
Comment
Question by:yunkaa
6 Comments
 
LVL 15

Expert Comment

by:Timbo87
ID: 9835135
You can't force the page to print the table background color. The only way to do this would be to tell the user to go to the Tools menu, click Internet Options, click the Advanced tab, scroll down to Printing, and check "Print background colors and images".
0
 
LVL 4

Expert Comment

by:sandy12879
ID: 9835139
Copy the same table in a excel sheet ,and try to print it from there...
0
 
LVL 11

Accepted Solution

by:
Zontar earned 400 total points
ID: 9836834
IN Mozilla and Netscape, this is done using File -> Page Setup -> check Print Background Colours & Images.

You might also try using CSS:

<style type="text/css">
@media print {
td.col1 {background-color:#FFC;}
}
</style>
<td class="col1">...</td>

But I'm not sure that this will override the user's settings or not, and my printer's DOA so I can't test it at the moment.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:yunkaa
ID: 9836881
Hi Zontar...

Please can you post the code with a table.  I keep getting errors trying to put it in the right place... :p

Many thanks,

Yun
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9837555
What sort of errors - and what browser are you using?  Printing backgrounds is strictly a user - set preference.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 10107030
You don't have to write any code

Follow  Timbo87's suggestion.

0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to delete "dots" above Bootstrap 3 navbar 4 59
Hide cell in a table 2 27
innerHTML 7 34
Filktering Alphabetically 8 30
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question