Idocs Guide to HTML

Background Colors and Transparent Background Images

If the background image is a transparent GIF, the page is rendered so that the background color is "underneath" the image, and the color peeks through the transparent parts. Consider this (slightly obnoxious) background image:

background image with transparency test image

The circles in the image are the only parts that aren't transparent. Now let's put that image on a page with a blue background:

this code produces this
this page

Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.