Home >> Tutorials/FAQs >> CSS Tutorials >> Index

CSS Tutorials - Background Style Properties

By: FYICenter.com

(Continued from previous topic...)

What Are the Background Style Properties?

There are 5 style properties that you can use to control the background of a HTML block tag:

  • background-color: Specifies the color of the background. It takes a color value or the keyword "transparent".
  • background-image: Specifies an image to be on the background. It takes a URL value or the keyword "none".
  • background-repeat: Specifies if the background image should be repeated or not, and how to repeat. It takes 4 possible keywords: "repeat", "repeat-x", "repeat-y", and "no-repeat".
  • background-attachment: Specifies how the background image should be attached to the content or the browser window. It takes 2 possible keywords: "scroll" and "fixed".
  • background-position: Specifies the initial position of the background image. It takes a pair of two values of percentages, length units, or key words.

Note that when HTML tags are nested, backgrounds of different tags become layers with the background of the most inner tag being the top layer.

(Continued on next topic...)

  1. What Needs To Be Considered When Designing Page Layout?
  2. What Is Screen Resolution?
  3. What Is Browser Resolution?
  4. How To Test Browser Resolutions?
  5. How Wide Do You Want Your Page Content to Be?
  6. What Are the Page Widths on Popular Websites?
  7. What Are the Length Units Used in CSS?
  8. How To Set Page Width Relative To the Browser Width?
  9. How To Set Page Width to a Fixed Value?
  10. How To Center Your Page in Browser Windows?
  11. What Happen to Images with Absolute Page Width Units?
  12. How To Set Page Widths to Relative Length Units?
  13. What Happen to Font Sizes with Relative Page Width Units?
  14. How To Set Font Sizes to Relative Length Units?
  15. What Are the Background Style Properties?
  16. How To Specify a Background Image?
  17. How To Position Background Images?
  18. How To Specify Two Background Images on a Page?

Selected Developer Jobs:

More...