B.10. border

A shorthand property that lets you set the same width, color, and style for all four borders of an element with a single property declaration. This property sets up identical borders on all four sides, but can be followed by side-specific border properties that modify them.

Inherited: No

See also: Section B.19border-width, Section B.18border-style, and Section B.16border-color

B.10.1. Value

You can specify a border-width value, a border-style value, and a border-color value, or any combination of the three, in any order, separated by spaces.

Initial value: none

B.10.2. Compatibility

CSS Version: 1

Works on all CSS-compatible browsers, with the same browser-specific limitations as the individual border- properties.

B.10.3. Example

This style rule puts a dashed, yellow border 1 pixel wide around div tags of class advertisement:

div.advertisement {
  border: dashed yellow 1px;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.29.89