Re: backgroun color in media print

Giganews Newsgroups
Subject: Re: backgroun color in media print
Posted by:  rf (…@invalid.com)
Date: Mon, 04 Feb 2008

"Petr Vileta" <stou…@practisoft.cz> wrote in message
news:fo5r92$2183$…@ns.felk.cvut.cz...
>I try to define this
> @media print {
>    span.red {border: 1px solid black;
>                            background-color: red}
> }
>
> and use it in html code by this way
>
> <p>Color: <span class=red>&nbsp;&nbsp;&nbsp;</span> red</p>
>
> If I do the same for @media screen then this work as expected, but not for
> @media print.
> I can't to find if this is feature or cross browsers bug ;-)

By default browsers do not print background colours or images (to save ink).
You will have to adjust your browser settings to make this happen. You
cannot adjust *my* settings to make it happen here.

> To explain what I can do: I want to create a small rectangle filled by
> some color, in this example red. I tried to use span, div, table, p, but
> nothing work for printer. What is the right way?

Use an image and hope that your viewers browser is set to print images.

> Please reply to <petr AT practisoft DOT cz>

Nope.

--
Richard.

Replies

None

In response to

backgroun color in media print posted by Petr Vileta on Mon, 4 Feb 2008