Text Links Ads : Marketing Tips Store : Search Engine Optimization Strategies
WebPosition Gold Pro : Domain Registration Bank : Optilink Software : GoDefy
Mike's Marketing Tools : Mike's Ecommerce Software : Text Links Guide
 
Web HTML-HTML.com
You are here: HTML Codes > Tables > Table Background Colors and Images

Table Backgrounds: Image

Setting the background image of a table can be done easily with styles. In this page we'll look at how to set the background image of the entire table. Later we'll set the background image of individual cells.

Suppose we want to use this image as the background:

deep sea background

As in the previous example we'll first create a set of style rules. The following code goes in the <HEAD> section of the page:

<STYLE TYPE="text/css">
<!--
.deepsea, .deepsea TD, .deepsea TH
{
background-image:url('deepsea.gif');
background-color:blue;
color:white;
font-family:sans-serif;
font-weight:600;
}
-->
</STYLE>

These rules state that for any element with its class set to deepsea, or any <TD ...> or <TH ...> within a deepsea element, there are several rules:

To apply the style to a table we simply set the table to the deepsea class with a CLASS attribute:

<TABLE CELLPADDING=8 CELLSPACING=0 CLASS="deepsea">

which gives us this table

blah blahyeah yeah
groovy duderight on

Table Backgrounds: Rows >>>

Copyright © 2002-8 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.HTML-HTML.com