Reply to Re: how to change Background Color (for printing)

Your name:

Reply:


Posted by Jonathan N. Little on 05/20/07 13:29

planb@newsreaders.com wrote:
> On May 10, 12:10 am, Adrienne Boswell <arb...@yahoo.com> wrote:
>> temujin <elbo...@hotmail.com> writing
>>
>>> Dear Group,
>>> When I change thebackgroundcolour in a table like this:
>>>
>>> <TR> <TH COLSPAN=6 BGCOLOR="#99CCFF"><H4>
>>> Motherboard</H4></TH> </TR>
>>>
>>> the colour is only visible on the html page. When I print it out (or
>>> print it to pdf) it´s still in Black&White.
>>>
>>> Can anyone tell me how to change this?
> -snip-
>> You should be able to tell the browser at print time that you want to
>> print background colors.
>
> You can do it without turning on the option to print background colors
> using CSS. I'm currently trying to figure out the best way of doing
> exactly that....
>
> Here's a sample that works, doesn't require any images and is only
> slightly ugly....
>
>
> <div style= "width:100px; height: 100px;">
> <div style="border-color:E9E9E8 E9E9E8 E9E9E8 E9E9E8;
> margin:10px;float:left;border-width:50px;
> border-style:solid;width:0px;height:0px;
> line-height:0px;">
> </div>
> <span style="position: relative; top: -100px;
> left: .9em;">
> This will have a colored <br />
> background when printing
> </span>
> </div>
>
> <p />
>
> <div style="width: 400px; height: 25px; background-color: E9E9E8;">
> No colored background when printing...
> </div>
>

Note sure what that will accomplish, but one thing I am sure of it is
not valid CSS.

HINT borders are added *outside* of a block, what you have here would be
a 100px square block with a 50px wide border! Also color values in hex
must be designated with a '#"

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация