CSS border-right-width Property
The border-right-width property in CSS specifies the thickness (width) of the right border of an element. It is used along with border-right-style and border-right-color to fully define the right border.
1. Syntax
Value Options:
-
thin– Sets a thin right border. -
medium– Sets a medium-sized right border (default). -
thick– Sets a thick right border. -
length– Specifies a custom width using units likepx,em,%,rem, etc. -
inherit– Inherits the value from the parent element.
2. Example – Setting border-right-width in Pixels
✅ The right border will be 5px thick, solid, and blue.
3. Example – Using Keywords (thin, medium, thick)
✅ The right border will be thick, dashed, and red.
4. Example – Using inherit to Copy the Parent's Right Border Width
✅ The child element will inherit the 8px right border from the parent.
5. Best Practices
✔ Always specify border-right-style along with border-right-width because a border with no style is invisible.
✔ Use border-right shorthand when setting width, style, and color together:
✔ If you want uniform borders on all sides, use the border-width property instead:

