3-CSS Border-Outline
3-CSS Border-Outline
The CSS border properties allow you to specify the style, width, and color
of an element's border.
Syntax :
border : [border-width] [border-style] [border-color]
1. Border-width :
The border-width property sets the width of an element's four borders.
Syntax:
border-width : medium | thin | thick | length;
If the border-width property has four values:
border-top-width: 10px;
border-bottom-width: 10px;
border-left-width: 10px;
border-right-width: 10px;
2. Border-style :
The border-style property sets the style of an element's four borders.
Syntax :
border-style: none | hidden | dotted | dashed | solid | double
groove | ridge | inset | outset;
If the border-style property has four values:
border-style: dotted solid double dashed;
o top border is dotted
o right border is solid
o bottom border is double
o left border is dashed
border-top-style: dotted;
border-bottom- style: dashed;
border-left- style: double;
border-right- style: solid;
3. border-color :
The border-color property is used to set the color of the four borders.
Syntax:
border-color: color | transparent;
If the border-color property has four values:
border-color: red green blue pink;
o top border is red
o right border is green
o bottom border is blue
o left border is pink
border-top-color: red;
border-bottom- color: green;
border-left- color: blue;
border-right- color: cyan;
1. outline-width :
The outline-width property specifies the width of an outline.
Syntax:
outline-width : medium | thin | thick | length;
2. outline-style :
The outline-style property specifies the style of an outline.
Syntax:
outline-style: none | hidden | dotted | dashed | solid | double
groove | ridge | inset | outset;
3. outline-color :
The outline-color property specifies the color of an outline.
Syntax:
outline-color: color ;
outline-offset :
The outline-offset property adds space between the outline and border
of an element.
Syntax:
outline-offset: length ;