Syntax | selector {border: width style color;}
(OR)
selector {border: value;}
|
---|---|
Usage | The border property is used as a shorthand method to specify one or more of the 3 border values (width, style, and color) all in one place. This property applies to all 4 sides. All 3 of these values are optional but at least one of them must be specified. Any of these values that are not specified will automatically be set to their initial value. Since the initial value for style is none, the border will not be visible unless style is set to one of the visible styles. |
Keywords |
|
Applies To | All elements |
Inherited | No |
Initial Value |
|
The border property is set by specifying all 3 values. The border property is set by only specifying a style. |