HTML and CSS Reference
In-Depth Information
Table 6.1
CSS properties used with formatting and page layout (continued)
Property
Description
Commonly Used Values
Style of the font
normal
(default),
italic
,
oblique
font-style
font-weight
Boldness or weight of the font
This varies: the text values
normal
,
bold
,
bolder
, and
lighter
can be used; the
numeric values
100
,
200
,
300
,
400
,
500
,
600
,
700
,
800
, and
900
can be used
height
Height of an element
A numeric value (
px
or
em
), numeric percent-
age, or
auto
(default)
left
Distance in from the left (of the
containing element) to display an
element
A numeric pixel value or percentage
line-height
Spacing allowed for the line of text
It is most common to use a percentage for
this value. For example, a value of
200%
is
double space.
list-style-image
Image used to replace “bullets” in
an XHTML list
url(imagename.gif)
or
url(imagename.jpg)
list-style-type
Indicates the type of list item
marker
Text values
none
,
disc
,
circle
,
square
,
decimal
,
lower-roman
,
upper-roman
,
lower-alpha
,
upper-alpha
margin
Shorthand notation to configure
the margin surrounding an
element
A numeric value (
px
or
em
) or percentage; for
example:
body {margin: 10px;}
will set
page margins in the document to 10 pixels.
If you set a value to 0 pixels, omit the
px
.
Four numeric values (
px
or
em
) can be speci-
fied. The values configure the margins in the
following order (
margin-top
,
margin-right
,
margin-bottom
,
margin-left
).
margin-bottom
Size of an element's bottom margin
A numeric value (
px
or
em
) or percentage
margin-left
Size of an element's left margin
A numeric value (
px
or
em
) or percentage
margin-right
Size of an element's right margin
A numeric value (
px
or
em)
or percentage
margin-top
Size of an element's top margin
A numeric value (
px
or
em
) or percentage
min-width
The minimum width of an element
A numeric value (
px
or
em
) or percentage
overflow
Controls the display of a block-
level element if the element
exceeds its set height or width
Text values
visible
(default),
hidden
,
auto
,
scroll
padding
Shorthand notation to configure
the amount of padding—the blank
space between the element and
its border
Two numeric values (
px
or
em
) or percentages.
The first value configures the top and bottom
padding, the second value configures the left
and right padding:
padding
:
20px 10px
;
Four numeric values (
px
or
em
) or percent-
ages. The values configure the padding in the
following order:
padding-top
,
padding-
right
,
padding-bottom
,
padding-left
.
padding-bottom
Blank space between an element
and its bottom border
A numeric value (
px
or
em
) or percentage
continued
Search WWH ::
Custom Search