- A Short History of Style for the Web
- What Is CSS?
- How Is CSS Used?
- Basic CSS Syntax
- The Basics of Selectors
- Basic Properties: Font Styles
- Inheritance
- Getting Specific: class and id Selectors
- Common Text Layout Properties
- Combinators: Descendant and Child Selectors
- Common Background Properties
- Dynamic Selectors
- Basic Page Layout
- Advanced Page Layout
- Positioning
- Advanced Selectors
- Display Types
- More Properties
- Media Types
- Importing Style Sheets
- Quality Assurance
- Specific Challenges and Techniques
More Properties
CSS provides quite a few more properties and selectors than we've been able to cover, but we've covered the most commonly used and widely supported features of CSS1 and CSS2. To give you a sense of what else you might want to investigate, here's a quick overview of some of the features we've left out.
Printing Properties
CSS2 features quite a few properties specifically for print styles—like widows and orphans, and page-breaking properties.
User Interface Properties
With CSS it's possible to style the outline of an element used when it has the focus. It's also possible to specify a cursor, using an image file URL or keywords for common cursor types.
Selectors
There are a number of very specialized and not very popular types of selectors we haven't touched on in this chapter:
- Language selectors, which select an element based on the value of an element's lang attribute, and allow us to style, for example, English text differently from Japanese text. For example, p:lang(en) selects a paragraph that has a lang attribute set to en.
- Typographical selectors, which allow us to select the first letter or first line of a given element. We can select the first letter of a heading of level 1 with h1:first-letter, or the first line of a paragraph with the selector p:first-line.
Generated Content
With CSS, it's possible to add strings, various quotation marks, images, and the values of attributes, as well as complex numbering as "generated content" that comes before and after an element. We could, for example, add the value of an href attribute of a link when a page is printed after the link itself using this statement:
a[href]:after { content: attr(href) } |