Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Table background color and font color flip when displayed on scree vs when the screen is printed

Guest
Feb 11, 2012 Feb 11, 2012

Copy link to clipboard

Copied

Hello all,

I have an application form that vendors complete, when they submit the form they are redirected to a formatted page that they are asked to print and sign. One small section of the form is laid out in a table and one of the cells has a black background and a white font color. The formatted page looks fine on screen but when I print it for this one cell the color of the background becomes white and the font becomes grey. The rest of the form prints fine(black font on a white background). Here's what the formatted section of the page looks like on screen

screenImage.jpg

and here's what it looks like with a print preview or when printed to a PDF file, notice the lower left corner now has a white background and grey font....sigh.

printedPdfImage.jpg

Here's the html for the table

<table width="100%" id="initial" style="font-style: normal; font-size: medium; margin:0; font-weight: normal;" cellpadding="0" cellspacing="0">

<tr>

  <td id="notice2" style="margin:o;">BUSINESS TAXES PAID WILL NOT BE REFUNDED</td>

  <td id="notice3">  READ AND INITIAL _______</td>

</tr>

</table>

and here's the inline style

#notice {

border: thin solid #000;

font-size:small;

}

.oneColFixCtr #container #mainContent #notice #initial tr #notice2 {

font-size: medium;

color: #FFF;

background-color: #000;

}

.oneColFixCtr #container #mainContent #notice #initial {

font-weight: bold;

font-size: medium;

}

Could someone tell me what I'm doing wrong?

Thanks,

Tony

TOPICS
Server side applications

Views

958
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2012 Feb 11, 2012

Copy link to clipboard

Copied

If you want things to look differently when printed you need to make a print stylesheet.  Here is a good tutorial introduction to the topic: http://www.alistapart.com/articles/goingtoprint/ . But what you are seeing is also a direct result of the browser.  Only IE and Firefox (& maybe Safari) print backgrounds and they print it as an option, not as a default.  Chrome does not print backgrounds in any way, it is a shortcoming of the browser.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 11, 2012 Feb 11, 2012

Copy link to clipboard

Copied

LATEST

Thanks for the info, I'll go over the article and see if there's an alternate to the way I'm doing it. I am using Win 7/ IE9 when testing. In this case I'd like the screen and the print to be the same so something must be affecting it, earlier on in the page I have some text that appears on the screen and does not appear on the print whichich is correct. Fortunately this is not a show stopper - it's a vendor application form for an airshow so worst case I'll do something else to draw attention to it.

Thanks again.

Tony

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines