CSS2 Cheat Sheet
by Dave Child (DaveChild) via [Link]/1/cs/14/
CSS2 Selectors CSS2 Sizes CSS2 Positioning
* All elements 0 0 requires no unit display clear
div <div> Relative Sizes position z-index
div * All elements within <div> em 1em equal to font size of parent (same top direction
div span <span> within <div> as 100%) right unicode-bidi
div, span <div> and <span> ex Height of lower case "x" bottom overflow
div > span <span> with parent <div> % Percentage left clip
div + span <span> preceded by <div> Absolute Sizes float visibility
.class Elements of class "class" px Pixels
CSS2 Dimensions
[Link] <div> of class "class" cm Centimeters
#itemid Element with id "itemid" mm Millimeters width min-height
div#itemid <div> with id "itemid" in Inches min-width max-height
a[attr] <a> with attribute "attr" pt 1pt = 1/72in max-width vertical-align
a[attr='x'] <a> when "attr" is "x" pc 1pc = 12pt height
a[class~='x <a> when class is a list
CSS2 Colours CSS2 Colour and Background
'] containing 'x'
a[lang|='en' <a> when lang begins "en" #789abc RGB Hex Notation color background-repeat
] #acf Equates to "#aaccff" background background-image
rgb(0,25, Value of each of red, green, and background-color background-position
CSS2 Pseudo Selectors and Pseudo Classes
50) blue. 0 to 255, may be swapped for background-attachment
:first-child First child element percentages.
:first-line First line of element CSS2 Text
CSS2 Box Model
:first-letter First letter of element text-indent word-spacing
:hover Element with mouse over text-align text-transform
:active Active element text-decoration white-space
:focus Element with focus text-shadow line-height
:link Unvisited links letter-spacing
:visited Visited links
:lang(var) Element with language "var" CSS2 Fonts
:before Before element font font-weight
:after After element font-family font-stretch
font-style font-size
font-variant font-size-adjust
By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by [Link]
[Link]/davechild/ Last updated 11th May, 2016. Measure your website readability!
[Link] Page 1 of 2. [Link]
CSS2 Cheat Sheet
by Dave Child (DaveChild) via [Link]/1/cs/14/
CSS2 Boxes CSS2 Aural
margin border-color volume elevation
margin-top border-top-color speak speech-rate
margin-right border-right-color pause voice-family
margin-bottom border-bottom-color pause-before pitch
margin-left border-left-color pause-after pitch-range
padding border-style cue stress
padding-top border-top-style cue-before richness
padding-right border-right-style cue-after speak-punctuation
padding-bottom border-bottom-style play-during speak-numeral
padding-left border-left-style azimuth
border border-width
CSS2 Miscellaneous
border-top border-top-width
border-bottom border-right-width content list-style-type
border-right border-bottom-width quotes list-style-image
border-left border-left-width counter-reset list-style-position
counter-increment marker-offset
CSS2 Tables list-style
caption-side border-spacing
table-layout empty-cells
border-collapse speak-header
CSS2 Paging
size page-break-inside
marks page
page-break-before orphans
page-break-after widows
CSS2 Interface
cursor outline-style
outline outline-color
outline-width
By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by [Link]
[Link]/davechild/ Last updated 11th May, 2016. Measure your website readability!
[Link] Page 2 of 2. [Link]