Page 6 - CSS
P. 6
Chapter 10: Cascading and Specificity 64
Remarks 64
Examples 64
Cascading 64
CSS Loading order 64
How are conflicts resolved? 64
Example 1 - Specificity rules 64
Example 2 - Cascade rules with identical selectors 65
Example 3 - Cascade rules after Specificity rules 65
A final note 65
The !important declaration 66
Calculating Selector Specificity 66
Example 1: Specificity of various selector sequences 67
Example 2: How specificity is used by the browser 67
Example 3: How to manipulate specificity 68
!important and inline style declarations 69
A final note 69
More complex specificity example 69
Chapter 11: Centering 71
Examples 71
Using CSS transform 71
CROSS BROWSER COMPATIBILITY 71
MORE INFORMATION 72
Using Flexbox 72
Using position: absolute 73
Ghost element technique (Micha Czernow's hack) 74
Using text-align 74
Centering in relation to another item 75
Vertical align anything with 3 lines of code 76
Vertically align an image inside div 76
Horizontal and Vertical centering using table layout 77
Using calc() 77

