Read CSS: The Definitive Guide, 3rd Edition Online
Authors: Eric A. Meyer
Tags: #COMPUTERS / Web / Page Design
This sets the width of the bottom margin for an element. Negative values are
permitted, but use them with caution.
auto
|inherit
0
All elements
No
Refer to the width of the containing block
For percentages, as specified; for length values, the absolute
length
This sets the width of the left margin for an element. Negative values are
permitted, but use them with caution.
auto
|inherit
0
All elements
No
Refer to the width of the containing block
For percentages, as specified; for length values, the absolute
length
This sets the width of the right margin for an element.
Negative values are permitted, but use them with caution.
auto
|inherit
0
All elements
No
Refer to the width of the containing block
For percentages, as specified; for length values, the absolute
length
This sets the width of the top margin for an element. Negative values are
permitted, but use them with caution.
auto
|inherit
0
All elements
No
Refer to the width of the containing block
For percentages, as specified; for length values, the absolute
length
The value of this property sets a maximum constraint on the height of
the element. Thus,
the element can be shorter than the specified value, but not taller. Negative values
are not permitted.
none
|inherit
none
All elements except inline nonreplaced elements and table elements
No
Refer to the height of the containing block
For percentages, as specified; for length values, the absolute length;
otherwise,none
The value of this property
sets a maximum constraint on the width of
the element. Thus,
the element can be narrower than the specified value, but not wider. Negative values
are not permitted.
none
|inherit
none
All elements except inline nonreplaced elements and table elements
No
Refer to the width of the containing block
For percentages, as specified; for length values, the absolute length;
otherwise,none
The value of this property sets a minimum constraint on the height of
the
element. Thus, the element can be taller than the specified value, but not shorter.
Negative values are not permitted.
inherit
0
All elements except inline nonreplaced elements and table elements
No
Refer to the height of the containing block
For percentages, as specified; for length values, the absolute
length
The value of this property sets a minimum constraint on the width of the element.
Thus, the element can be wider than the specified value, but not narrower. Negative
values are not permitted.
inherit
0
All elements except inline nonreplaced elements and table elements
No
refer to the width of the containing block
For percentages, as specified; for length values, the absolute length;
otherwise,none
This shorthand property is used to set the overall outline
for an element. Outlines can be of irregular shape, and they do not change or
otherwise affect the placement of elements.
[
] |inherit
Not defined for shorthand properties
All elements
No
See individual properties (outline-color
, etc.)
This property sets the color for the visible portions of the overall outline of an
element. Remember that an outline's style must be something other thannone
for any border to appear.
invert
|inherit
invert
(or user agent-specific; see
text)
All elements
No
As specified
This property is used to set the style for the overall border of an element. The
style must be something other thannone
for any
outline to appear.
none
|dotted
|dashed
|solid
|double
|groove
|ridge
|inset
|outset
|inherit
none
All elements
No
As specified
This property sets the width for the overall outline of an element. The width will
take effect only for a given outline if the outline's style is something other thannone
. If the style isnone
, the width is effectively reset to0
. Negative length values are not permitted.
thin
|medium
|thick
|inherit
medium
All elements
No
Absolute length;0
if the style of the
border isnone
orhidden
This defines what happens
to content that overflows the content area of an element. For the value scroll, user
agents are supposed to provide a scrolling mechanism whether or not it is actually
needed; thus, for example, scrollbars would appear even if all content can fit within
the element box.
visible
|hidden
|scroll
|auto
|inherit
visible
Block-level and replaced elements
No
As specified
This shorthand property sets the width of the overall padding for an element or
sets the widths of each individual side padding. Padding set on inline nonreplaced
elements does not affect line-height calculations; therefore, such an element with
both padding and a background may visibly extend into other lines and potentially
overlap other content. The background of the element will extend throughout the
padding. Negative padding values are not permitted.
[ inherit
Not defined for shorthand elements
All elements
No
Refer to the width of the containing block
See individual properties (padding-top
, etc.)
Padding can never be negative