Background Properties: Property Description Possible Values Examples
Background Properties: Property Description Possible Values Examples
Background Properties
top left
top
center
top right
center
left
center
center
center
right
bottom
left
bottom
center
1
Ankit Virparia
bottom
right
backgroun
d-color
backgroun
d-image
backgroun
d-repeat
backgroun
d-
attachmen
t
backgroun
d-
position
Border Properties
2
Ankit Virparia
3
Ankit Virparia
4
Ankit Virparia
border-bottom-color
5
Ankit Virparia
border-right-color red; }
border-bottom-color
border-left-color div { border-
color:green
Undeclared values work as red blue; }
further shorthand notation. If
only one color value is
declared, all four borders will
use that color. If two colors
are declared, the top and
bottom borders will use the
first color while the right and
left borders will use the
second color. If three colors
are declared, the top border
will use the first color, the
right and left borders will use
the second color, and the
bottom border will use the
third color.
6
Ankit Virparia
7
Ankit Virparia
}
auto
crosshair div {
default cusrsor:url(image.csr),
pointer pointer; }
move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help
8
Ankit Virparia
9
Ankit Virparia
rect(top,
right,
bottom,
left)
baseline
sub
super
top
text-top
middle
bottom
text-
bottom
10
Ankit Virparia
Dimension Properties
11
Ankit Virparia
Font Properties
font-size Declares the size Lengths (number and unit div { font-
of the font. type size:70%; }
Previously set in i.e. 1em, 12pt, 10px, 80%)
HTML via or one of the following div { font-
the sizeattribute predefined values: size:0.85em; }
in a <font> tag.
xx-small div { font-
x-small size:medium; }
small
medium
large
x-large
xx-large
smaller
larger
Declares
the aspect
value (font size
divided by x-
height).
12
Ankit Virparia
div { font-
variant:small-
caps; }
13
Ankit Virparia
counter-reset Declares the value the Integers and the More Information
counter is set to on each predefined
instance of a selector. value none.
14
Ankit Virparia
List Properties
ul { list-style-
position:outside; }
15
Ankit Virparia
list-
style-type
list-
style-
position
list-
style-
image
Margin Properties
div {
margin-
top:15%; }
div {
margin-
right:15%; }
16
Ankit Virparia
div {
margin-
bottom:15%;
}
div {
margin-
left:15%; }
Outline Properties
outline-color Declares the outline Valid color names, RGB div { outline-
color. values, hexidecimal color:green; }
notation.
div { outline-
color:#00FF00; }
17
Ankit Virparia
Padding Properties
div {
padding-
top:15%; }
div {
padding-
right:15%; }
18
Ankit Virparia
div {
padding-
bottom:15%; }
div {
padding-
left:15%; }
Page Properties
19
Ankit Virparia
size Declares the size and Lengths, and the More Information
orientation of a page box. following
predefined values:
auto
landscape
potrait
Table Properties
table { border-
collapse:separate;
}
20
Ankit Virparia
space. }
If one length is
value is
declared, that
length is used
for both the
horizontal and
vertical
spacing. If two
lengths are
declared, the
first one is
used for
horizontal
spacing and
the second one
is used for
vertical
spacing.
table { table-
layout:fixed; }
Text Properties
21
Ankit Virparia
div { line-
height:125%; }
div { letter-
spacing:-1px; }
22
Ankit Virparia
23
Ankit Virparia
May be used in
conjunction with the div { unicode-
the direction propert bidi:bidi-override; }
y.
Other Properties
left-side
far-left
left
center-left
center
center-
right
right
far-right
right-side
behind
leftwards
rightwards
24
Ankit Virparia
cue-before
cue-after
below
level
above
higher
lower
25
Ankit Virparia
pause-after
x-low
low
medium
high
x-high
Alternatley, one of
the following
keywords:
auto
none
26
Ankit Virparia
x-slow
slow
medium
fast
x-fast
faster
slower
27
Ankit Virparia
silent
x-soft
soft
medium
loud
x-loud
28