Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 1st, 2003, 07:49 AM
Authorized User
Join Date: Jul 2003
Location: , , .
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default How Do I Print Table Cell Colours?

Hi there

I was wondering if anyone could help me with the following.

I have a website with a page containing tables and coloured in cells:

If I want to print preview this page, assuming default settings in browser, when I view the page, all the colours disappear. I know that one of the default settings in my browser is 'don't print out the background colour' which is fine cos this would use lots of ink, but why are my table cell colours not showing up?

Any ideas how I can sort this out. It would be good, from a customer point of view, if people could print out this page with colours as they might need the page as a reference for availability.

Thanks in advance


Reply With Quote
  #2 (permalink)  
Old December 1st, 2003, 02:45 PM
Friend of Wrox
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts

This might be the obvious but sometimes overlooked... are you using a color printer?

Reply With Quote
  #3 (permalink)  
Old December 2nd, 2003, 05:19 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

As you said the setting is "Print background colors and images" and you are using the bgcolor, i.e. background colour attribute. What do you expect? You could put a note on the site about printing and how o change settings.


Reply With Quote
  #4 (permalink)  
Old December 2nd, 2003, 06:34 AM
Authorized User
Join Date: Jul 2003
Location: , , .
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks for your response. I didn't necessarily think that page background colour and cell background colour were classed as the same, even though they are both bgcolor. I have heard that it's possible to put some code at the top of each page that overrides the browser settings and prints out the page background but i'm guessing that no-one knows this otherwise it would be in a reply!

Yes, an obvious thought would be to put some text on the page about printing etc, but i was trying to avoid this.

Not to worry.


Reply With Quote
  #5 (permalink)  
Old December 3rd, 2003, 12:35 AM
Authorized User
Join Date: Jun 2003
Location: Lexington, KY, USA.
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post

I suppose if you really wanted to print cells with a background color, you could set a background image for each cell. The image would just be a swatch of color, and you could set the attributes to tile it so you only have to download a very small graphic for each color....

(Oh, the things we do to get HTML to do what we want!)

(Old dog learning new tricks...)
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
layers in table cell dearmisskat HTML Code Clinic 12 March 10th, 2007 04:46 AM
reading from a table cell? Atomsk Access VBA 2 September 28th, 2006 07:46 AM
Scroll bars in table cell jaffacake HTML Code Clinic 2 November 17th, 2005 03:08 PM
Hyperlink in a cell table amc Dreamweaver (all versions) 33 August 5th, 2004 12:11 PM

All times are GMT -4. The time now is 06:19 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.