It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

Coloring a Table's TR and TD for Printouts

Coloring a Table's TR and TD for Printouts

Postby jp2aaon on Tue Feb 12, 2008 9:42 pm

I have a nice table I built in HTML at the request of our HR department.

They want the report titles to be color coordinated, which I was able to do easily by including this information in either TR or TD sections and spedifying their color using a css file. However, whenever they print out the report to sent it along, the colors do not show up.

I could tell them they have to set their browsers every time to print backgrounds, then change the settings back whenever they get finished, but that seems like a failure on the developer's part (that's me).

Philipp Lenssen on TheScripts.com mentioned writing a custom style sheet, but failed to say how this would be done - and that was 2-1/2 years ago!

Could someone help me modify my css file to include a print section that will allow my TR and TD background-colors to print?

I have started with this:
Code: Select all
@media print
{
  #content
  {
    width:90%;
    font-size:10pt;
  }
  #footer
  {
    display:none;
  }
}
But I don't know what to write in it for the rows and details of my tables.

Thanks very much in advance if you do!
User avatar
jp2aaon
 
Posts: 5
Joined: Tue Feb 12, 2008 9:11 pm
Location: East Texas

Postby dflynn on Tue Feb 12, 2008 10:51 pm

User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada

Postby jp2aaon on Wed Feb 13, 2008 4:48 pm

Didn't work. Oh well.
User avatar
jp2aaon
 
Posts: 5
Joined: Tue Feb 12, 2008 9:11 pm
Location: East Texas


Who is online

Users browsing this forum: No registered users and 0 guests