Chapter 8. Advanced CSS

Chapter 4 introduced the basics of Cascading Style Sheets. In other chapters, you learned how to use CSS to style links, navigation bars, text, and tables. You can go a long way in web design with just those basic techniques (and many people do). However, to really become a web-design expert, there are a handful of advanced CSS concepts you should grasp. Fortunately, Dreamweaver includes tools to help you with these concepts so you can work more efficiently and avoid those head-scratching “Why the heck does my design look like that?!” moments.

Note

This chapter will help you on your journey from CSS novice to master. But keep in mind that it’s the rare mortal who understands everything about CSS from reading a single chapter. If you really want to know the ins and outs of CSS, check out CSS: The Missing Manual.

Compound Selectors

It’s pretty easy to learn how to use tag, class, and ID styles. To be technically accurate, all these styles aren’t really styles. In CSS lingo, they’re selectors, instructions that tell a browser what it should look for so it can apply CSS formatting rules. For example, a tag selector (not to be mistaken with Dreamweaver’s time-saving selection tool, the Tag Selector) tells a browser to apply the formatting to any instance of a particular tag on the page. Thus, browsers apply h1 tag styles to all <h1> tags on a page. They apply class selector styles, on the other hand, only when they encounter the class name attached ...

Get Dreamweaver CS5.5: The Missing Manual 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.