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