how to change Background Color (for printing)

T

temujin

Dear Group,

When I change the background colour 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?

best regards
temu
 
A

Adrienne Boswell

Dear Group,

When I change the background colour 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?

best regards
temu

You should be able to tell the browser at print time that you want to
print background colors.
 
B

Bergamot

temujin said:
When I change the background colour in a table
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?

You can only change it for yourself, through your browser settings. You
cannot "force" other people to print your background colors or graphics.
 
T

Travis Newbury

You can only change it for yourself, through your browser settings. You
cannot "force" other people to print your background colors or graphics.

Sure you can. I can force anyone to do anything I want. If I came to
your house and held your family/dog/lover/etc hostage and in the
ransom note I told you I wanted you to print a web page and you had
better print the background color or image or I would cut off your
wife's/dog's/kid's/mom's/etc's genitals. I am thinking you would do
exactly what I told you to do.

Ok, this is probably not practical, but it would work on any website,
so, in the pure sense, I CAN force you to do anything I want you to
do.
 
B

Bergamot

Travis said:
I can force anyone to do anything I want. If I came to
your house and held your family/dog/lover/etc hostage

Ok, this is probably not practical

Probably not. :)
 
J

Jonathan N. Little

Travis said:
Sure you can. I can force anyone to do anything I want. If I came to
your house and held your family/dog/lover/etc hostage and in the
ransom note I told you I wanted you to print a web page and you had
better print the background color or image or I would cut off your
wife's/dog's/kid's/mom's/etc's genitals.

Wow, must be some *JScript* script required to do that!
 
N

Neredbojias

Sure you can. I can force anyone to do anything I want. If I came to
your house and held your family/dog/lover/etc hostage and in the
ransom note I told you I wanted you to print a web page and you had
better print the background color or image or I would cut off your
wife's/dog's/kid's/mom's/etc's genitals. I am thinking you would do
exactly what I told you to do.

Ok, this is probably not practical, but it would work on any website,
so, in the pure sense, I CAN force you to do anything I want you to
do.

Bah. You underestimate the nature of the human spirit. Besides, what if
the guy doesn't like his wife and kids?
 
D

dorayme

"Jonathan N. Little said:
Wow, must be some *JScript* script required to do that!

nah... Travis would send a very graphic flash movie of what would
happen to his victim's family and believe me, he would get the
victim to print any background stipulated.
 
P

planb

-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>
 
J

Jonathan N. Little

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 '#"
 
J

J.B. Moreno

(e-mail address removed) wrote:

-snip how to print background colors?-
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!

You say that like it's a problem. It's actually the solution.

The code that will print a "background" color consists of 3 pieces.
(1) a 100px square block, (2) a 0px square block with 50px borders that
are set to a particular color, and finally (3) a span with a relative
position so that it overlays 2.
Also color values in hex must be designated with a '#"

Yes, the result of some cut-n-paste code. If it kept your browser from
showing what I describe, then my apologies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top