CSS3 Cheat Sheet 2
CSS3 Cheat Sheet 2
CSSCHEATSHEET
Shorthand*
background
border
borderbottom
borderleft
borderright
bordertop
font
liststyle
margin
padding
Comments
/*Comment*/
Pseudo
Selectors
:hover
:active
:focus
:link
:visited
:firstline
:firstletter
Media
Types
all
braille
embossed
handheld
print
projection
screen
speech
tty
tv
Units
Length%
em
pt
px
Keywords
bolder
lighter
larger
SYNTAX
BOXMODEL
Syntax
selector{property:value}
ExternalStyleSheet
<linkrel="stylesheet"type="text/css"
href="style.css"/>
InternalStyle
<styletype="text/css">
selector{property:value}
</style>
InlineStyle
<tagstyle="property:value">
GENERAL
Class
ID
div
span
color
cursor
display
Stringprecededbyaperiod
Stringprecededbyahashmark
Formatsstructureorblockoftext
Inlineformatting
Foregroundcolor
Appearanceofthecursor
heightwidthmargintop
marginrightmargin
bottommarginleft
paddingtoppadding
rightpaddingbottom
paddingleft
BORDER
border
width
border
style
Widthoftheborder
border
color
Coloroftheborder
POSITION
clear
blockinlinelistitemnone
overflow Howcontentoverflowingitsboxis
handled
visible,hidden,scroll,auto
visibility visible,hidden
FONT
dasheddotteddoublegrooveinsetoutset
ridgesolidnone
Anyfloatingelementsaroundtheelement?
both,left,right,none
float
Floatstoaspecifiedside
left,right,none
left
Theleftpositionofanelement
top
Thetoppositionofanelement
auto,lengthvalues(pt,in,cm,px)
auto,lengthvalues(pt,in,cm,px)
fontstyle Italic,normal
position static,relative,absolute
font
variant
font
weight
zindex Elementaboveorbelowoverlappingelements?
normal,smallcaps
bold,normal,lighter,bolder,integer
(100900)
fontsize Sizeofthefont
font
Specificfont(s)tobeused
family
TEXT
letter
spacing
lineheight
textalign
text
decoration
textindent
text
transform
vertical
align
word
spacing
Spacebetweenletters
auto,integer(highernumbersontop)
BACKGROUND
backgroundcolor Backgroundcolor
backgroundimage Backgroundimage
backgroundrepeat repeat,norepeat,repeatx,repeaty
background
attachment
Backgroundimagescrollwiththe
element?
scroll,fixed
Verticaldistancebetween
baselines
Horizontalalignment
blink,linethrough,none,overline,
underline
Firstlineindentation
capitalize,lowercase,uppercase
background
position
(xy),top,center,bottom,left,right
LIST
liststyle Typeofbulletornumberinginthelist
type
disccirclesquaredecimallowerromanupper
romanloweralphaupperalphanone
Verticalalignment
liststyle Positionofthebulletornumberinalist
position insideoutside
Spacingbetweenwords
liststyle Imagetobeusedasthebulletinalist
image
*Thepropertiesforeachselectorareintheordertheyshouldappearwhenusingshorthandnotation.
http://www.lesliefranke.com/files/reference/csscheatsheet.html
1/1