As promised, here's info on the shorthand property that enables you to apply all the background properties previously discussed in one tidy CSS rule.
This is what you have to use for IE 3 (as we've mentioned), so you might as well use it for all browsers.
background
With the background property, you can define background color, image, tiling method, scrolling versus fixed status, and position. Example:
P { background: url(/98/15/stuff3a/background.gif) #CCFFCC repeat-y top right }
This paragraph has the above rule applied to it. As you can see, the background color is light green. And the background image is tiled only vertically, with the first tile positioned at the top-right corner of the "box" surrounding this paragraph. (Remember that Communicator doesn't support background positioning.)
If your browser doesn't support this CSS property, click here to see what it looks like.
When you use background, you don't necessarily have to set every aspect of the background. You could set just the image and color if you wanted to, or any other combination.
As you might have guessed, any browser bugs that we already ran into for the individual background properties also apply to this shorthand property.
Ah, the freedom and power of stylesheets. Now, let's get our hands dirty.
next page»