Read CSS: The Definitive Guide, 3rd Edition Online
Authors: Eric A. Meyer
Tags: #COMPUTERS / Web / Page Design
This sets the font to use an italic, oblique, or normal
font face. Italic text is generally defined as a separate face within the font
family. It is theoretically possible for a user agent to compute a slanted font face
from the normal face.
italic
|oblique
|normal
|inherit
normal
All elements
Yes
As specified
This property is basically used to define small-caps text. It is theoretically
possible for a user agent to compute a small-caps font face from the normal face.
small-caps
|normal
|inherit
normal
All elements
Yes
As specified
This property sets the font weight used in rendering an element's text. The
numeric value400
is equivalent to the keywordnormal
, and700
is equivalent tobold
. Each numeric
value must be at least as light as the next lowest number and at least as heavy as
the next highest number.
normal
|bold
|bolder
|lighter
|100
|200
|300
|400
|500
|600
|700
|800
|900
|inherit
normal
All elements
Yes
One of the numeric values (100
, etc.),
or one of the numeric values plus one of the relative values (bolder
orlighter
)
This defines the height of
an element's content
area, outside of which padding, borders, and margins are added. This property is
ignored for inline nonreplaced elements. Negative length and percentage values are
not permitted.
auto
|inherit
auto
Block-level and replaced elements
No
Calculated with respect to the height of the containing block
Forauto
and percentage values, as
specified; otherwise, an absolute length, unless the property does not apply
to the element (thenauto
)
This property defines the offset between the left outer margin edge of a
positioned element and the left edge of its containing block.
auto
|inherit
auto
Positioned elements (that is, elements for which the value ofposition
is something other thanstatic
)
No
Refer to the width of the containing block
For relatively positioned elements, see Note; forstatic
elements,auto
; for length values, the corresponding absolute length; for
percentage values, the specified value; otherwise,auto
For relatively positioned elements, the computed value ofleft
always equalsright
This defines the amount of whitespace to be inserted between the character boxes
of text. Since character glyphs are typically narrower than their character boxes,
length values create a modifier to the usual spacing between letters. Thus,normal
is synonymous with0
. Negative length values are permitted and will cause letters to bunch
closer together.
normal
|inherit
normal
All elements
Yes
For length values, the absolute length; otherwise,normal
This property influences
the layout of line boxes. When applied to a block-level element, it defines the
minimum distance between baselines within that element, but not the maximum. The
difference between the computed values ofline-height
andfont-size
(called
"leading" in CSS) is split in half and added to the top and bottom of each piece of
content in a line of text. The shortest box that can enclose all of those pieces of
content is the line box. A raw number value assigns a scaling factor, which is
inherited instead of a computed value. Negative values are not permitted.
normal
|inherit
normal
All elements (but see text regarding replaced and block-level
elements)
Yes
Relative to the font size of the element
For length and percentage values, the absolute value; otherwise, as
specified
This is a shorthand property that condenses all the other list-style properties.
Because it applies to any element that has adisplay
oflist-item
, it will apply
only toli
elements in ordinary HTML and XHTML,
although it can be applied to any element and inherited bylist-item
elements.
[ inherit
Refer to individual properties
Elements whosedisplay
value islist-item
Yes
See individual properties
This specifies an image to be used as the marker on an ordered or unordered list
item. The placement of the image with respect to the content of the list item can be
broadly controlled usinglist-style-position
.
none
|inherit
none
Elements whosedisplay
value islist-item
Yes
For none
This property is
used to declare the position of the list marker with respect to the content of the
list item. Outside markers are placed some distance from the border edge of the list
item, but the distance is not defined in CSS. Inside markers are treated as though
they were an inline element inserted at the beginning of the list item's content.
inside
|outside
|inherit
outside
Elements whosedisplay
value islist-item
Yes
As specified
This is used to declare the type of marker system to be used in the presentation
of a list.
disc
|circle
|square
|decimal
|decimal-leading-zero
|lower-roman
|upper-roman
|lower-greek
|lower-latin
|upper-latin
|armenian
|georgian
|none
|inherit
disc
|circle
|square
|decimal
|decimal-leading-zero
|upper-alpha
|lower-alpha
|upper-roman
|lower-roman
|lower-greek | hebrew |
|
armenian | georgian | cjk-ideographic | hiragana | katakana |
hiragana-iroha | noneinherit
disc
Elements whosedisplay
value islist-item
Yes
As specified
This shorthand property sets the width of the
overall margin for an element or sets the widths of each individual side margin.
Vertically adjacent margins of
block-level elements are collapsed, whereas inline
elements effectively do not take top and bottom margins. The left and right margins
of inline elements do not collapse, nor do margins on floated elements. Negative
margin values are permitted, but use them with caution.
[ auto
]{1,4} |inherit
Not defined
All elements
No
Refer to the width of the containing block
See individual properties