vijay Posted February 24, 2007 Share Posted February 24, 2007 Hi.. I have used css in my html page.. while am going to print it it wont get colors from class which is applied by css eventhough am getting output very well formed. Even in print preview am not getting colors. Waiting 4 ur reply....Thanks in advance...Regards,Vijay Link to comment Share on other sites More sharing options...
jlhaslip Posted February 24, 2007 Share Posted February 24, 2007 Can we see some of the code, especially the css file which controls the printing. Often times the print css file will turn colours off. To save ink.And just to confirm that the printer is a colour printer? and the cartridges are good? Link to comment Share on other sites More sharing options...
PrateekSaxena Posted February 24, 2007 Share Posted February 24, 2007 Maybe you have a black and white printer LOL :)Code please Link to comment Share on other sites More sharing options...
vijay Posted February 26, 2007 Author Share Posted February 26, 2007 Hi.... Here is code for U... try this and try to see page preview and try to print the page... What will u get tell me..Thanks in advance ...Vijay---------------------------------------------------------------------------------------------------<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/><meta name="keywords" content=""/><meta name="description" content=""/><title>my test page</title><style type="text/css">.table_milestone_marg { padding-bottom: 20px; margin-top: 10px; margin-bottom: 10px;}.product_type { font: bold 14px "Century Gothic"; color: #003d7d; padding-left: 5px; }.weekperiod { font: bold 10px/15px Arial, Helvetica, sans-serif; color: #000000; text-align: center;}.table_menu_margin { margin-top: 0px; margin-bottom: 5px;}.product { font: 13px Arial, Helvetica, sans-serif; color: #333333; padding-left: 5px;}.amount { font: normal 13px "Century Gothic"; color: #333333; text-align:center; }#tr { padding-top: 5px;}.nav_dropdown { font: 10px Arial, Helvetica, sans-serif; color: #000066; text-align: left; margin-top: 3px; }html, body, #wrapper { height:100%; margin: 0 auto; padding: 0; border: none; left: 10%; right: 10%;} #wrapper2 { height:100%; margin: 0 auto; padding: 0; border: none; left: 10%; right: 10%;}body { margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px;}.lightrow{ background-color:#F2F2F2;}.darkrow{ background-color:#CAD9F0;}.yellowrow { background-color:#FFDD55;}.whiterow{ background-color:#FFFFFF;}</style></head><body onLoad="if(typeof(pageLoad) == 'function') pageLoad();" ><table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#C3C3C3" id="tr"> <thead> <tr align="center" > <td width="28%" align="left" class="product_type">Main Category </td> <td width="12%">Â </td> <td width="12%">Â </td> <td width="12%">Â </td> <td width="12%">Â </td> <td width="12%">Â </td> <td width="12%">Â </td> </tr> <tr class="lightrow"> <td width="28%" align="left" class="product">Sub Cat1 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $16.80 </td> <td align="right" width="12%" class="amount"> $12.99 </td> </tr> <tr class="darkrow"> <td width="28%" align="left" class="product">Sub Cat2 </td> <td align="right" width="12%" class="amount"> $29.82 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $34.80 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $17.80 </td> <td align="right" width="12%" class="amount"> $29.94 </td> </tr> <tr class="lightrow"> <td width="28%" align="left" class="product">Sub Cat3 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $29.98 </td> <td align="right" width="12%" class="amount"> $98.55 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $39.95 </td> <td align="right" width="12%" class="amount"> $123.95 </td> </tr> <tr class="darkrow"> <td width="28%" align="left" class="product">Sub Cat4 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $149.70 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> </tr> <tr class="lightrow"> <td width="28%" align="left" class="product">Sub Cat5 </td> <td align="right" width="12%" class="amount"> $25.95 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $29.90 </td> <td align="right" width="12%" class="amount"> $0.00 </td> </tr> <tr class="darkrow"> <td width="28%" align="left" class="product">Sub Cat6 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> </tr> <tr class="lightrow"> <td width="28%" align="left" class="product">Sub Cat7 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $52.00 </td> <td align="right" width="12%" class="amount"> $41.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> </tr> <tr class="darkrow"> <td width="28%" align="left" class="product">Sub Cat8 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> <td align="right" width="12%" class="amount"> $0.00 </td> </tr> <tr align="left" class="mainmenu"> <td class="product">Sub Cat9</td> <td class="amount"><strong>$55.77</strong></td> <td class="amount"><strong>$29.98</strong></td> <td class="amount"><strong>$283.05</strong></td> <td class="amount"><strong>$52.00</strong></td> <td class="amount"><strong>$145.45</strong></td> <td class="amount"><strong>$166.88</strong></td> </tr> <tr align="left" class="yellowrow"> <td align="left" class="product_type">Total Sales</td> <td class="amount"><strong>$55.77</strong></td> <td class="amount"><strong>$29.98</strong></td> <td class="amount"><strong>$283.05</strong></td> <td class="amount"><strong>$52.00</strong></td> <td class="amount"><strong>$145.45</strong></td> <td class="amount"><strong>$166.88</strong></td> </tr></table></body></html> Link to comment Share on other sites More sharing options...
jlhaslip Posted February 26, 2007 Share Posted February 26, 2007 Only thing I can think of is that table row background colours don't get fed to the print stream.Might want to check that out in the html Specs at the w3c. http://www.w3.org/TR/html4/struct/tables.html#edef-TABLE Link to comment Share on other sites More sharing options...
vijay Posted February 26, 2007 Author Share Posted February 26, 2007 Hi... I have checked that things also and searched many things.. but dont getting required strong solution... Is there any other way instead of putting background image...Regards,Vijay Link to comment Share on other sites More sharing options...
jesh Posted February 26, 2007 Share Posted February 26, 2007 Hi... I have checked that things also and searched many things.. but dont getting required strong solution... Is there any other way instead of putting background image...Regards,VijayThis may be a setting in your browser. In IE, go to "Tools->Internet Options" and select the "Advanced" tab. Scroll down to the "Printing" section and make sure that "Print background colors and images" is selected.In Firefox, go to "File -> Page Setup" and select the "Format & Options" tab. Make sure that "Print Background (colors & images)" is selected. Link to comment Share on other sites More sharing options...
kvnmck18 Posted February 26, 2007 Share Posted February 26, 2007 Try making a seperate CSS for printing<style type="text/css" media="print"> Link to comment Share on other sites More sharing options...
pulpfiction Posted February 26, 2007 Share Posted February 26, 2007 This may be a setting in your browser. In IE, go to "Tools->Internet Options" and select the "Advanced" tab. Scroll down to the "Printing" section and make sure that "Print background colors and images" is selected.In Firefox, go to "File -> Page Setup" and select the "Format & Options" tab. Make sure that "Print Background (colors & images)" is selected.Guess this is the solution, I tried and the print preview which was in B/W, and after changing the setting it came up in color..... couldnt check by printing though [no color printer] Link to comment Share on other sites More sharing options...
vijay Posted February 27, 2007 Author Share Posted February 27, 2007 Thanks to all of you..Its working...!Regards,Vijay Link to comment Share on other sites More sharing options...
vijay Posted February 28, 2007 Author Share Posted February 28, 2007 Hi...I have done those things and its working perfactly.. But this is manual process that needs to be done on all systems individually. We wanted a process which can be implemented without any customised settings on inividual browsers.. So.. Is it possible..?Regards,Thanks in advanceVijay Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now