Setting background colour and images in CSS

by Tweak on June 8, 2009
in Html/Css

With a few simple attributes, CSS can be used to control the background of most any item on a web page. The background of heavily used tags for page structure, including div, p, and td can be controlled by applying a style with the following background attributes.

Attributes (The Long and Easily Explanable Way)

background-color

This attribute defines a solid color in the background of an object. Word values for colors and hexadecimal values can be used for colors. If no background color is set, the color of the item immediately behind the object will show through. The background-color attribute can also skillfully be used in conjuction with background-image. Before the background image loads, and in areas of the object in which is not displaying, a color defined with background-color will show. Here is an example for defining a maroon background color:
Read more…

Share and Enjoy:
  • email
  • Print
  • PDF
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • StumbleUpon
  • MySpace
  • Live
  • Twitter
  • Yahoo! Buzz