O'Reilly logo

The CSS Pocket Guide by Chris Casciano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8. Backgrounds and Borders

Through the color and images of backgrounds and borders, a site’s owner or creator can transform bland pages of text into designs that convey a mood, aesthetic, and branding. That is asking a lot of just two seemingly simple properties, but as you’ll see throughout this chapter, they’re very flexible and powerful properties.

Backgrounds

Backgrounds are an integral part of styling an HTML document. Solid colors, patterns, tiles, gradients, unconventional borders, and nonrectangular shapes can all be achieved by applying the various background properties to the right element.

background-color

The background-color property is applied throughout the content area of the element and is drawn behind any background-image ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required