CSS border-top-right-radius Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The border-top-right-radius property rounds the physical top-right corner of an element. One value makes a circular arc; two values make an elliptical corner.

Unlike border-start-end-radius, this corner never moves with writing mode or direction. For all four corners at once, use border-radius.

Baseline · Widely available.

Not deprecated and not experimental. Supported across modern browsers and Internet Explorer 9+. Prefer the unprefixed property; old -webkit- / -moz- names are legacy only.

CSS Syntax

syntax.css
border-top-right-radius: <length-percentage> <length-percentage>? | initial | inherit;

One value makes a circular arc. Two values set horizontal then vertical radii for an ellipse. Negative values are invalid. Initial value is 0.

Property Values

ValueDescriptionTry it
<length>Fixed size such as 10px or 1em. One value = circular cornerTry it
<percentage>Relative to the border box. Horizontal % uses width; vertical % uses heightTry it
two valuesHorizontal then vertical radius for an elliptical corner, e.g. 40px 12pxTry it
0Default. No rounding on the top-right cornerTry it
initialResets to the default value, 0Try it
inheritTakes the value from the parent elementTry it

How to Use border-top-right-radius

Round only the top-right corner when the other corners should stay square.

  1. Choose the element that needs a rounded top-right corner.
  2. Set border-top-right-radius with a length, percentage, or two values.
  3. Give the box a visible background or border so the curve is easy to see.
  4. Leave the other corners alone, or set them separately if the design needs it.
PieceRequired?Role
Length or percentageYes (to round)Default 0 leaves the corner square
Background or borderRecommendedMakes the curve visible while you learn
Physical top-rightBy designDoes not flip in RTL or vertical writing modes
Not inheritedBy designSet it on the element you want rounded

Live Preview

Change border-top-right-radius and watch only the top-right corner update.

Only the physical top-right corner rounds. The other three corners stay square.

Corner

border-top-right-radius: 24px

CSS Examples

Each snippet focuses on border-top-right-radius only. Use Try It Yourself for a live editor.

Example 1 — Circular Corner with a Length

Round the top-right corner with a fixed pixel radius.

CSS
<style>
  div {
    width: 200px;
    height: 100px;
    background: #2563eb;
    border: 2px solid #1e3a8a;
    border-top-right-radius: 24px;
  }
</style>

<div>Top-right</div>
Try It Yourself

How It Works

  1. Size the box. Width and height give the corner something to curve against.
  2. Make it visible. A background and border show the edge clearly.
  3. Set one length. 24px creates a circular arc on the top-right corner only.
  4. Leave other corners square. This property never rounds top-left, bottom-left, or bottom-right by itself.

Example 2 — Elliptical Corner

Use two values so the horizontal and vertical radii differ.

CSS
<style>
  div {
    width: 220px;
    height: 80px;
    background: #0f766e;
    border: 2px solid #115e59;
    border-top-right-radius: 40px 12px;
  }
</style>

<div>Ellipse</div>
Try It Yourself

How It Works

  1. Pass two lengths. The first is the horizontal radius; the second is the vertical radius.
  2. Widen the curve. 40px stretches the arc sideways along the top edge.
  3. Flatten the height. 12px keeps the vertical part of the curve short.
  4. Result. The top-right corner looks like part of an ellipse, not a quarter-circle.

Example 3 — Percentage on a Square

Use a percentage so the curve scales with the box size.

CSS
<style>
  div {
    width: 120px;
    height: 120px;
    background: #2563eb;
    border: 2px solid #1e3a8a;
    border-top-right-radius: 50%;
  }
</style>

<div>50%</div>
Try It Yourself

How It Works

  1. Use a square box. Equal width and height keep a single percentage circular.
  2. Set 50%. Horizontal % uses width; vertical % uses height.
  3. Watch the scale. On a larger square, the same 50% makes a larger arc.
  4. Non-square tip. On a wide rectangle, one percentage value becomes an ellipse because the axes differ.

Edge Cases & Pitfalls

If the wrong corner rounds, or nothing changes, check these first.

shorthand

border-radius can reset this longhand

A later border-radius shorthand resets corners you set earlier. Declare the longhand after the shorthand, or set all corners in the shorthand.

logical

Physical top-right ignores RTL

In right-to-left layouts the rounded corner still stays on the screen’s top-right. Use border-start-end-radius when the curve should follow reading direction.

%

Percentages follow width and height

A horizontal percentage uses the box width; a vertical percentage uses the height. On a non-square box, 50% is not a perfect quarter-circle unless both axes match.

clip

Backgrounds follow the rounded corner

Background color and images are clipped to the curve. Fine-tune that with background-clip when the fill should stop at the padding or content box.

table

Collapsed tables are unreliable

User agents are not required to apply border radii on table / inline-table when border-collapse: collapse. Internal table elements are also undefined.

Browser Support

border-top-right-radius is a browser CSS property for rounded corners. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

border-top-right-radius

Chrome 4+, Firefox 4+, Safari 5+, Edge 12+, Opera 10.5+, Internet Explorer 9+. Unprefixed support is universal in current browsers.

97% Global support
Google Chrome 4+
Full support
Mozilla Firefox 4+
Full support
Apple Safari 5+
Full support
Microsoft Edge 12+
Full support
Opera 10.5+
Full support
Samsung Internet 4+
Full support
Internet Explorer 9+
Full support
border-top-right-radius Widely supported

Bottom line: Safe for physical top-right rounding in current browsers. Prefer the unprefixed property. Vendor prefixes are legacy. It is not a runtime API.

Key Takeaways

  • Role: round the physical top-right corner only.
  • Values: one length/percentage for a circle; two values for an ellipse.
  • Physical: always top-right on the screen — not writing-mode aware.
  • Initial value: 0. Not inherited. Shorthand can reset it.

One line: use border-top-right-radius when only the physical top-right corner should curve.

Frequently Asked Questions

It rounds the physical top-right corner of an element. The other three corners stay square unless you set them separately.
The initial value is 0, so the top-right corner is square until you set a length or percentage.
border-top-right-radius always rounds the physical top-right corner. border-start-end-radius follows writing-mode and direction, so in RTL it may round the top-left corner instead.
Yes. One value makes a circular arc. Two values set the horizontal and vertical radii for an elliptical corner, for example 40px 12px.
Yes. Percentages refer to the corresponding dimension of the border box: the horizontal axis uses the width, and the vertical axis uses the height. Negative values are invalid.
It is Baseline Widely available: Chrome 4+, Firefox 4+, Safari 5+, Edge 12+, Internet Explorer 9+. It is a browser CSS property, not a Node.js feature.

Next: border-top-style

Set the line style of the physical top border.

border-top-style tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful