Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Cascading Style Sheets (CSS); Backgrounds (part 2 of 2)

By Will Bontrager
2003-10-15


The Background of Tables

Background color and images can be specified for tables, almost identical in method to specifying backgrounds for DIV sections. For testing, create a CSS class in the HEAD area of your page, like this:

<style type="text/css">
<!--
.tabletest { background-image: url(image.jpg); }
-->
</style>

Now, when you create a table in your web page with class "tabletest", the table's background will be whatever you specified for that class.
Example:

<table class="tabletest">
<tr>
<td>
Table data cell content here.
</td>
</tr>
</table>

Image tiling and positioning, and background color styles are specified using the same specifications language as the class for DIV sections.

Tutorial Pages:
» Introduction
» The Background of Divisions of the Web Page, Within DIV Tags
» The Background of Tables
» The Background Behind Sections of Text Content
» The Background Behind INPUT and TEXTAREA Form Elements
» Example for the HEAD section
» The Background Behind Ordered and Unordered Lists
» Here are examples for the HEAD area


Copyright 2004 Bontrager Connection, LLC


 | Bookmark
Related Tutorials:
» Planning Your Stylesheet - The Definitive Guide
» CSS Shorthand Properties
» Print Stylesheet - The Definitive Guide
» Using CSS Selectors to Highlight Unedited Form Fields
» An Introduction to CSS
» Overlapping tabbed navigation in CSS

Ask A Question
characters left.