How Do You Set Cascading Style Sheets (CSS) Background Properties?
The Cascading Style Sheets (CSS) background property allows Web developers to set background colors and background images for elements in Web pages. According to O’Brien (2007), background elements include total element item width, height, border, and padding. For this article, examples will be presented using the BODY tag. CSS background properties include background-color, background-image, background-repeat, background-attachment, and background-position and using embedded styles (http://www.ehow.com/how_4701864_using-cascading-style-sheets-css.html). For this article, we will only discuss background color and image properties. For information on attachment and position properties refer to the resources provided. The code for setting background color to blue for the BODY tag is as follows. BODY { background-color: blue; } To set a background image, the following code is used: BODY { background-image: url(“css-bg.jpg”) } Notice that the default setting is that the image repeats. Note