HTML/CSS Service

How to use CSS Background Properties

Category: CSS, CSS 2 Tutorial, CSS Examples    |    831 views   |   

Background Color
The background-color property sets the background color of a targeted element.
background-color: value;
Values:
• color name
• hexadecimal number
• RGB color code
• transparent

Background Attachment
Apply a background attachment if you wish to use an image as a background item. You also have the option to set the background in such a way that it moves with the page when a user scrolls down or as fixed with the background-attachment property.

background-attachment: value;
Values:
• fixed
• scroll

CSS Background

background: #ffffff url(path_to_image) top left no-repeat fixed;
Choose any item/s from the following values:
• attachment
• color
• image
• position
• repeat

Background Image
Use the background-image property to mount an image as an element’s background.
background-image: url(path_to_image);
Values:
• url
• none

Background Position
Control the position of an image you intend to use as a background for an element with the background-position property:
background-position: value;
Values:
• top left
• top center
• top right
• center left
• center center
• center right
• bottom left
• bottom center
• bottom right
• x-% y-%
• x-pos y-pos

Background Repeat
The background-repeat property allows you to repeatedly set a background image for an element (across=x and/or down=y).
background-repeat: value;
Values:
• no-repeat
• repeat
• repeat-x
• repeat-y

List Style
Manage the appearance of ordered, as well as unordered, lists with only a single declaration through the list-style property.
list-style: value value;
Values:
• image
• position
• type

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • digg
  • del.icio.us
  • Stumble it
  • Furl
  • Reddit
  • BlinkList
  • Simpy
  • YahooMyWeb
  • Spurl

Share/Save/Bookmark

1 Star2 Stars

Tags: ,

0 responses so far!

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word