border-right-style
Summary
Sets the style of an element’s right border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style.
Overview table
- Initial value
none
- Applies to
- All elements
- Inherited
- No
- Media
- visual
- Computed value
- specified value
- Animatable
- No
- CSS Object Model Property
borderStyleTop
- Percentages
- N/A
Syntax
border-right-style: dashed
border-right-style: dotted
border-right-style: double
border-right-style: groove
border-right-style: hidden
border-right-style: inset
border-right-style: none
border-right-style: outset
border-right-style: ridge
border-right-style: solid
Values
- none
- Default. Border is not drawn, color and width are ignored. If the border is an image, the image layer counts but is not drawn. See background-image.
- hidden
- Same as
none
, except in terms of conflict resolution of collapsed borders. Any element with ahidden
border suppresses all shared borders at that location. Borders with a style of none have the lowest priority. - dotted
- A series of round or square dots.
- dashed
- A series of square-ended dashes.
- solid
- A single line segment.
- double
- Border is a double line drawn on top of the background of the object. The sum of the two single lines and the space between equals the border-width value. The border width must be at least 3 pixels wide to draw a double border.
- groove
- Looks as if it were carved in the canvas. (This is typically achieved by creating a “shadow” from two colors that are slightly lighter and darker than the border-color.)
- ridge
- Looks as if it were coming out of the canvas.
- inset
- Looks as if the content on the inside of the border is sunken into the canvas.
- outset
- Looks as if the content on the inside of the border is coming out of the canvas.
Examples
Border styles in CSS.
.one {
border-right-style: none;
}
.two {
border-right-style: outset;
}
.three {
border-right-style: hidden;
}
.four {
border-right-style: dotted;
}
.five {
border-right-style: dashed;
}
.six {
border-right-style: solid;
}
.seven {
border-right-style: double;
}
.eight {
border-right-style: groove;
}
.nine {
border-right-style: ridge;
}
.ten {
border-right-style: inset;
}
Notes
- Borders are drawn in front of the element’s background, but behind the element’s content (in case it overlaps).
- There is no control over the spacing of the dots and dashes, nor over the length of the dashes.
- How borders of different styles are joined in the corner may vary.
- Rounded corners may cause the corners and the contents to overlap, if the padding is less than the radius of the corner.
Related specifications
- CSS Level 3 - Backgrounds and Borders Module
- Candidate Recommendation
See also
Related articles
Border
border-right-style
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]