Sams Teach Yourself HTML and CSS in 24 Hours (7th Edition)

Margins allow you to add a bit of spacing around the outer edge of an element, outside of the element's border.

margin

Usage

A shorthand property that allows you to set all the margin properties in one declaration.

Values

margin-top, margin-right, margin-bottom, margin-left.

margin-bottom

Usage

Sets the bottom margin of an element.

Values

auto, length, %.

margin-left

Usage

Sets the left margin of an element.

Values

auto, length, %.

margin-right

Usage

Sets the right margin of an element.

Values

auto, length, %.

margin-top

Usage

Sets the top margin of an element.

Values

auto, length, %.

Категории