Chapter 4

Working with Graphics

In This Chapter

arrow Working with the <img> tag

arrow Displaying foreground images

arrow Displaying background images

arrow Placing graphics on the page

arrow Working with repetitive images

Content comes in a number of forms, but the two most common forms are text and graphics. CSS provides a number of methods for dealing with both of these forms. Earlier chapters of this book focused on text. This chapter begins your foray into graphics.

Most developers rely on premade graphics to create sites. So this chapter focuses on the mechanics of working with graphics — the techniques used to present them onscreen, rather than on any design or aesthetic element of graphics. Of course, the starting point for most graphic elements is the <img> tag. Even though the <img> tag isn't strictly a CSS element, knowing about the tag is essential if you want to use CSS to control the presentation of graphics.

An object can contain any number of foreground images and a single background image. (The ...

Get CSS3 For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.