Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How Do You Set Cascading Style Sheets (CSS) Background Properties?

0
Posted

How Do You Set Cascading Style Sheets (CSS) Background Properties?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.