Skip to content
Tutorials Center
My learning

Topics

CSS Reference ยท Borders, Outlines and Shadows

The border-top-right-radius property

Reference for the CSS border-top-right-radius property: round only the top-right corner with one or two radii, with a live example, syntax and usage notes.

The border-top-right-radius property rounds the top-right corner of a box and leaves the other corners as they are. It is one of the four longhands of the border-radius shorthand, useful when a single corner needs different treatment, such as the corner next to a close button.

The property is physical: it always refers to the top-right corner on screen, even in right-to-left text or vertical writing modes. For corners that follow the writing direction, use border-start-end-radius.

CSS
.badge {
  border-top-right-radius: 24px;
}

Try it

Only the top-right corner

Syntax

CSS
border-top-right-radius: <length-percentage>{1,2};
  • Initial value: 0
  • Applies to: all elements (but not internal table elements when border-collapse is collapse)
  • Inherited: no
  • Animatable: yes, as lengths and percentages
  • Computed value: two absolute lengths or percentages

Values

Value Description
One <length> or <percentage> A circular corner of that radius.
Two values Horizontal radius first, then vertical radius, for an elliptical corner. No slash is used in a longhand.
Percentages Horizontal radii are relative to the width of the border box, vertical radii to its height.

Usage notes

  • Order matters. A longhand only overrides the shorthand if it comes later in the cascade, so write border-radius first.
  • Elliptical corners. In the example, 20px 60px is 20px wide and 60px tall: a tall, narrow curve.
  • Scaling. If the radii along one side add up to more than the side length, all radii are reduced by the same factor.
  • Negative values are invalid.
  • Content is not clipped unless the element sets overflow to something other than visible.

Browser support

Supported in every current browser.