Solved

Table colors and images

Posted on 2004-10-19
5
177 Views
Last Modified: 2010-04-06
Here is what I am trying to do.  With the help of a member I was able to finally figure out my online coupon with the following code, works great!:

<html><head>
<style>
.coupon {
     border: 2px gray dashed;
     width: 400px;
     padding: 5px;
}
</style>
</head><body>
<div class="coupon">
     This is your wonderful coupon!<br />
     Print it out to recieve $0.50 cents off your next can of cat food!<br />
     Enjoy Kitty Loves Me brand!<br />
</div>
</body></html>

What I would like to happen and I have tried it a few ways without any luck.  I would like the table background say a light gray and when it prints it is a light gray.  But when I try that it comes out white since the table color will not print.  Is there a way to do like an image under then I can overlay my text?

0
Comment
Question by:precision
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:nurbek
Comment Utility
it depends on the Browser settings

from the Tools -> Internet Options -> Advanced

check the "Print background colors and images"

:)




 
0
 

Author Comment

by:precision
Comment Utility
That is good for my machine, I want something that anyone who prints, it will print out in color.  Like an image table background that I can overlay text on.
0
 
LVL 13

Expert Comment

by:nurbek
Comment Utility
anyone who wants to print it out with colors
they also should change their browser settings
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 250 total points
Comment Utility
What I would like to happen and I have tried it a few ways without any luck.  I would like the table background say a light gray and when it prints it is a light gray.  But when I try that it comes out white since the table color will not print.  Is there a way to do like an image under then I can overlay my text?

You cannot control user settings.  You have no way of knowing what kind of printer the user has.  Images in general do not print well. You could us a layer wiht an image an then overlay the text, but that will require absolute positioning, and the position of the test and image will not line up the some when it is printed about 75% of the time.

If an image is critical then you will have to do the page with a print friendly format like PDF.  If color is important, then you are going to be disappointed because only a small percentage of users are going to have color printing capabilities.

Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
Glad we could help.  Thanks for the A. :^)

Cd&
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now