computer help index
 
 
Search:
"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 tips!

Web Development - Images and Backgrounds

GIF Background Color = Webpage Color = Problem?

Bookmark and Share

Here's the scenario. You've just created a webpage and assigned a really nice background color to the page or a table on the page. Now, you copy that EXACT color and use it for the background color of a GIF. You anti-alias everything so the image looks great. So, when you place the image on the page, the two background colors should be exactly the same and there should be no clash of colors, right?

Wrong.

Some web browsers, including Netscape, use a color cube when it comes to picking web colors to show on a webpage. Even if you are using 65,536 colors (true-color), Netscape still dithers the image. So, technically, while the image background color is the same as the page or table background color, you will still see a difference in colors on the page.

The only way to solve this problem? Even though you saved the image with the 'correct' background color and anti-aliased correctly, you should save the GIF as a transparent GIF. Use the GIF background color as the transparent color.

I know what you're saying - you should not have to do this. You may be right, but what you should not have to do and what you need to do to make the page look good are too completely different things. This technique has worked several times in the past, and hopefully it will work well for you.

 

Discuss This Tip

Print This Tip

Get E-Mail When New Tips are Online

Return to the Web Development - Images and Backgrounds page.


More in MalekTips:
Microsoft Internet Explorer 8Microsoft Publisher 2007Digital Waterfall Photography



Access a Favorite Website from Anywhere with a Keyboard ShortcutTwo Ways to Move a Page[MODIFIED] Avoid Water Vapor

Follow Us On Twitter
 
RSS Feeds - Subscribe!
 

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Get Tips!'.
 



( sample / details ) ( opt-out instructions )
 


 Free Offer! - Subscribe to the MalekTips computer help list and be one of the first to get new computer tips, articles, and download links! ( privacy policy )  ( opt-out instructions )
This page and its contents are copyright
©1997 - 2009 Envision Programming. ( copyright/disclaimer )

Home | Free Computer Help Newsletter! | Windows | Web Development | DOS and Batch Files | Removing Spyware
Digital Camera and Photography | Computer and Internet | Software | Microsoft Word
Computer Articles | About | Contribute a Tip | Link To Us! | Computer and Technology Links
RSS Feeds |  Contact Us | Advertising | Privacy Policy | Computer Help Forums