CSS Master

(Primo) #1

Table of Contents


Preface..................................................... xvii


Who Should Read This Book.................................. .xvii
Conventions Used........................................... xviii
Code Samples.......................................... .xviii
Tips, Notes, and Warnings................................. .xix
Supplementary Materials..................................... .xix
Want to take your learning further?............................. .xx

Chapter 1 Selectors..................................... 1


Combinators.................................................. 2
The Descendant Combinator................................. 5
The Child Combinator...................................... 7
The Adjacent Sibling Combinator............................. 8
The General Sibling Combinator............................. 10
Attribute Selectors............................................ 12
Matching Attribute Presence............................... 13
Matching Hyphenated Attribute Values...................... 14
Matching Attribute Values by Substring...................... 17
Pseudo-classes versus Pseudo-elements.......................... 19
Pseudo-elements............................................. 19
::before and ::after.................................. 20
Creating Typographic Effects with ::first-letter.......... 23
Creating Typographic Effects with ::first-line............ 31
User Interface Fun with ::selection...................... 35
Pseudo-classes............................................... 38
Highlighting Page Fragments with :target.................. 38
Negating Selectors with :not()............................ 42
Free download pdf