What is "Pro CSS and HTML Design Patterns"? It is CSS book written for developers. It is full of patterns you can use to code web pages. Each pattern is a building block that you can combine with other patterns to create web pages.
By using these patterns, you will dramatically increase your productivity, your web pages will work reliably in all major browsers, and you will be following the best practices because you will be creating XHTML that is semantic and structural and using CSS to create styles and layouts.
Below is a concrete example of an XHTML/CSS design pattern. It is the Section design pattern and it is the basic building block of all web pages. It is discussed in detail in chapter 13 of my book.
<div class="section TYPE">
<HEADING> content </HEADING>
<BLOCK> content </BLOCK>
</div>
*.section { STYLES }
*.section.TYPE { STYLES }
*.section.TYPE HEADING { STYLES }
*.section.TYPE BLOCK { STYLES }
*.section *.section { STYLES }
Notice that the pattern is pseudo-code for XHMTL and CSS code. HEADING and BLOCK are not XHTML elements but are placeholders for any XHTML heading or block element. TYPE is also not a CSS class, but is a placeholder for a class that specifies a semantically meaningful identifier of the section, such as "introduction", "content", "example", etc. Thus, you can see that a pattern is generalized to work with a variety of XHTML elements and CSS classes.
The CSS code in the pattern is interesting because it shows that CSS does have some "object-oriented" capabilities, such as subclassing and inheritance. These selectors are discussed in detail in Chapter 3.
My book contains concrete examples of each design pattern, such as the following:
<div class="section introduction">
<h2>Introduction</h2)
<p>This paragraph is about the introduction.</p>
</div>
*.section.introduction { padding:10px; }
*.section.introduction p { margin-top:5px; }
*.section.introduction h2 { margin-bottom:10px; }
*.section.introduction { background-color:gold }
*.section.introduction *.section { margin-bottom:0; }
The 300+ examples in my book are posted at my website
http://cssdesignpatterns.com