Cascading Style Sheets (CSS); Backgrounds (part 2 of 2)
By Will Bontrager
2003-10-15
Reader Rating:

Introduction
Part 1 focused on the many ways to specify web page backgrounds with CSS. This part 2 addresses these subjects:
1. The background of divisions of the web page, within DIV tags.
2. The background of tables.
3. The background behind sections of text content.
4. The background behind INPUT and TEXTAREA form elements.
5. The background behind ordered and unordered lists.
This part 2 supposes you are familiar with part 1. Without that familiarity, especially if you are a novice with CSS, part 2 can be confusing. Part 1 is linked from here.
Like part 1, the CSS examples in part 2 are provided in the format used when the styles are defined in the HEAD area of a web page. For site-wide implementation, you can use an external file for the same effects.
See previous articles of the "Cascading Style Sheets (CSS)" series, "Getting Started" and "Learning More," for more information about those two methods of defining CSS styles. The articles are linked from here.
Netscape 4.# does not comply with all CSS rules the way some other browsers do. To see how your page appears in that browser, download it and use it for testing. Netscape 4.# won't position background images any place other than top left, for example. And background colors and images behind blocks of text extend only as far as the longest line (most browsers extend the background to the right margin).
Copyright 2004 Bontrager Connection, LLC
If you found this article interesting, you may want to read these as well:
» Cascading Style Sheets (CSS); Backgrounds (part 1 of 2)
» Cascading Style Sheets (CSS); Learning More
» Cascading Style Sheets (CSS); Getting Started
|