Πρότυπο CSS border-right

Definition and Usage

The border-right shorthand property sets all the properties of the right border in a single declaration.

The following properties can be set in order:

If a value is not set, it will not cause any problems, for example, border-right:solid #ff0000; is also allowed.

See also:

CSS Tutorial:CSS περιθώρια

HTML DOM Reference Manual:borderRight Property

Example

Set the style of the right border:

p
  {
  border-style:solid;
  border-right:thick double #ff0000;
  }

Try It Yourself

CSS Syntax

border-right: border-width border-style border-color|initial|inherit;

Property Value

Value Description
border-right-width Specifies the width of the right border. See also:border-right-width possible values.
border-right-style Specifies the style of the right border. See also:border-right-style possible values.
border-right-color Specifies the color of the right border. See also:border-right-color possible values.
inherit Specifies that the border-right property should inherit the settings from the parent element.

Technical Details

Default Value: not specified
Inheritance: no
Version: CSS1
JavaScript Syntax: object.style.borderRight="3px solid blue"

More Examples

All right border properties in one declaration
This example demonstrates a shorthand property that sets all right border properties in a single declaration.

Browser Support

The numbers in the table indicate the first browser version that fully supports this property.

Chrome IE / Edge Firefox Safari Opera
1.0 4.0 1.0 1.0 3.5

Note:Browsers prior to IE7 do not support the value "inherit". IE8 requires !DOCTYPE. IE9 supports "inherit".