CHAPTER 17 CSS TECHNIQUES

IN THIS CHAPTER

Style properties for tables

Changing list bullets and numbers

Turning lists into navigation bars

Replacing text with images

CSS rollovers

By now you have a solid foundation in writing style sheets. You can style text, element boxes, and even create page layouts using floats and positioning. But there are a few more properties and common CSS techniques that I want you to know about before we move on to creating web graphics in Part IV.

This chapter is a grab bag of sorts. It starts with the CSS properties specifically related to table and list formatting. It then moves on to common CSS-based design practices such as using lists as the basis for horizontal navigation bars, using images in place of text in a way that is accessible to screen readers, and using the :hover pseudoselector to create rollovers (an effect that used to require JavaScript).

NOTE

This chapter merely scratches the surface of CSS techniques, so I encourage you to further your education starting with the CSS resources listed at the end of Chapter 11, Cascading Style Sheets Orientation.

Style Properties for Tables

We’ve already covered the vast majority of style properties you’ll need to style content in tables. For example, the appearance and alignment of the content within the cells can be specified using properties we covered in Chapter 12, Formatting Text and Chapter 13, Colors and Backgrounds. In addition, you can treat the table and cells themselves with padding, ...

Get Learning Web Design, 3rd Edition 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.