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

Every block element has a border that can be styled. Although you can certainly leave borders invisible, there are several styles that can be applied to element borders.

border

Usage

A shorthand property that allows you to set all the properties for the four borders in one declaration.

Values

border-width, border-style, border-color.

border-bottom

Usage

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

Values

border-bottom-width, border-style, border-color.

border-bottom-color

Usage

Sets the color of the bottom border.

Values

border-color.

border-bottom-style

Usage

Sets the style of the bottom border.

Values

border-style.

border-bottom-width

Usage

Sets the width of the bottom border.

Values

thin, medium, thick, length.

border-color

Usage

Sets the color of the four borders.

Values

color.

Notes

Can be specified using from one to four colors.

border-left

Usage

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

Values

border-left-width, border-style, border-color.

border-left-color

Usage

Sets the color of the left border.

Values

border-color.

border-left-style

Usage

Sets the style of the left border.

Values

border-style.

border-left-width

Usage

Sets the width of the left border.

Values

thin, medium, thick, length.

border-right

Usage

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

Values

border-right-width, border-style, border-color.

border-right-color

Usage

Sets the color of the right border.

Values

border-color.

border-right-style

Usage

Sets the style of the right border.

Values

border-style.

border-right-width

Usage

Sets the width of the right border.

Values

thin, medium, thick, length.

border-style

Usage

Sets the style of the four borders.

Values

none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset.

Notes

Can be specified using from one to four styles.

border-top

Usage

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

Values

border-top-width, border-style, border-color.

border-top-color

Usage

Sets the color of the top border.

Values

border-color.

border-top-style

Usage

Sets the style of the top border.

Values

border-style.

border-top-width

Usage

Sets the width of the top border.

Values

thin, medium, thick, length.

border-width

Usage

A shorthand property for setting the width of the four borders in one declaration.

Values

thin, medium, thick, length.

Notes

Can be specified using from one to four widths.

Категории