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


Here are examples for the HEAD area


<style type="text/css">
<!--
LI { background-color: yellow; }
UL { background-image: url(image.jpg);
background-repeat: no-repeat; }
OL { background-image: url(image.jpg); }
-->
</style>

And, example lists:

<ul>
<li>
<p>A list item.</p>
</li>
<li>
<p>Another list item.</p>
</li>
</ul>

<ol>
<li>
<p>A list item.</p>
</li>
<li>
<p>Another list item.</p>
</li>
</ol>

In the above lists, the list items have paragraph spacing. The area taken up with each list as a whole will contain the specified background image. The list items will have a yellow background, which covers the image wherever the list item text is printed.

Now you have a lot of tools related to using background colors and images to help you design awesome web pages.

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.