A line appears only when the style is not none. Width defaults to medium and color to currentColor when omitted. It always stays on the right, unlike border-inline-end, which follows writing direction.
Baseline · Widely available.
Not deprecated and not experimental. The physical side border shorthands have been supported across browsers for a long time.
Choose double. The browser draws two lines with a gap between them.
Give it room.6px is wide enough for both lines and the space between.
Set the color. Teal fills both lines on the right edge.
One side only. The other three sides stay without a border from this rule.
Edge Cases & Pitfalls
If the right border disappears or looks wrong, check these first.
style
No style means no border
border-right: 5px red still looks empty because style defaults to none. Always include solid or another style keyword.
reset
The shorthand resets omitted parts
Writing border-right: thick green after border-right-style: dotted resets style to none. Put the style inside the shorthand, or set longhands after it.
RTL
Physical right does not flip in RTL
border-right stays on the right even when direction: rtl. Use border-inline-end when the trailing edge should move with text direction.
size
Borders add to the box by default
With content-box sizing, a right border grows the element’s outer width. Use box-sizing: border-box to keep width inclusive of the border.
sides
This shorthand is one side only
For the same look on every side, use border. For the left edge, use border-left.
Compatibility
Browser Support
border-right is a browser CSS property for the box model. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
border-right
Supported in all modern browsers and Internet Explorer. The physical side border shorthands have been part of CSS for a long time.
100%Universal support
Google ChromeAll versions
Full support
Mozilla FirefoxAll versions
Full support
Apple SafariAll versions
Full support
Microsoft EdgeAll versions
Full support
OperaAll versions
Full support
Samsung InternetAll versions
Full support
Internet ExplorerAll versions
Full support
border-rightWidely supported
Bottom line: Safe everywhere for width, style, and color on the physical right edge. Prefer border-inline-end when the edge should follow writing direction. It is not a runtime API.
Remember
Key Takeaways
Role: one shorthand for width, style, and color on the physical right edge.
Style first: without a visible style, width and color do nothing.
Physical: always the right side. Use border-inline-end for logical trailing edges.
Defaults: omitted width is medium; omitted color is currentColor; omitted style is none.
One line:border-right paints the physical right edge — include a style, then add width and color as needed.
Frequently Asked Questions
It is a shorthand that sets border-right-width, border-right-style, and border-right-color on the physical right edge in one declaration.
A border needs a visible style. The initial style is none, so width or color alone will not draw a line. Include solid, dashed, dotted, or another style.
Width, style, and color can appear in any order. A common pattern is width then style then color, for example border-right: 4px solid #2563eb.
border-right always paints the physical right side. border-inline-end follows writing direction, so it can move to the left in RTL layouts.
No. It only sets the right edge. Use border for all four sides, or the other side shorthands for top, bottom, and left.
It is Baseline and widely available in all modern browsers and Internet Explorer. It is a browser CSS property, not a Node.js feature.