CSS border-top-right-radius Property

Beginner
⏱️ 6 min read
📚 Updated: Jun 2026
🎯 4 Examples
Box Model & Borders

What You’ll Learn

The border-top-right-radius property rounds the physical top-right corner of an element. It is a corner longhand of border-radius — ideal when you want one custom corner without affecting the other three.

01

Top-Right Corner

Physical corner only.

02

Length Values

px, em, rem units.

03

Percentages

Relative to box size.

04

Two Values

Horizontal and vertical radii.

05

Asymmetric UI

Tabs and card accents.

06

Default 0

Square corner by default.

Definition and Usage

The border-top-right-radius CSS property controls the rounding of the physical top-right corner of an element’s border box. It is one of four corner longhands that let you style each corner individually.

Unlike logical properties such as border-start-end-radius, border-top-right-radius always targets the top-right corner — even in RTL or vertical writing modes. That makes it straightforward for tab shapes, asymmetric cards, and one-off design accents.

💡
Beginner Tip

Start with border-top-right-radius: 20px; on a colored box to see the curve on one corner only. Increase the value for more rounding, or use 50% on a square box for a large quarter-circle effect.

📝 Syntax

The syntax for border-top-right-radius lets you use one value for a circular corner or two values for an elliptical corner:

syntax.css
selector {
  border-top-right-radius: <length> | <percentage>;
}

/* elliptical corner */
selector {
  border-top-right-radius: <horizontal> / <vertical>;
}

Basic Example

border-top-right-radius.css
.box {
  width: 200px;
  height: 100px;
  background-color: lightblue;
  border: 2px solid blue;
  border-top-right-radius: 20px;
}

A length value such as 10px or 1em sets a fixed curve. A percentage is relative to the element’s width and height.

Syntax Rules

  • This property affects only the physical top-right corner.
  • The default value is 0, which means a square corner.
  • One value creates a circular corner radius on both axes.
  • Two values set horizontal and vertical radii separately, such as 10px 20px.
  • The mapped physical corner does not change with direction or writing-mode.

⚡ Quick Reference

QuestionAnswer
Initial value0
Applies toPhysical top-right corner only
InheritedNo
AnimatableYes, as a length
Common useTab shapes, asymmetric cards, and one custom corner

Default Value

The default value of border-top-right-radius is 0. That means the top-right corner is not rounded unless you set a radius value.

💎 Property Values

border-top-right-radius accepts length, percentage, and elliptical values.

ValueExampleMeaning
Lengthborder-top-right-radius: 20px;Fixed corner radius such as px, em, or rem
Percentageborder-top-right-radius: 50%;Radius relative to the element’s dimensions
Two valuesborder-top-right-radius: 10px 20px;Horizontal radius first, vertical radius second
initialborder-top-right-radius: initial;Resets to the default value of 0
inheritborder-top-right-radius: inherit;Inherits the value from the parent element
unsetborder-top-right-radius: unset;Resets to inherited or initial value depending on context
10px 20px 50%

Common Value Types

fixed px
percentage
two values

Top-Right Corner and Writing Modes

border-top-right-radius always rounds the physical top-right corner. Text direction and vertical writing modes do not move the curve — compare with border-start-end-radius when the rounded corner should follow the writing mode.

Horizontal (writing-mode: horizontal-tb)

Vertical (writing-mode: vertical-rl)

Square corner (default)

Rounded top-right

border-top-right-radius vs related properties

PropertyTargetsBest for
border-top-right-radiusPhysical top-right cornerTab shapes, asymmetric cards, and one custom corner
border-radiusAll four corners togetherCards, buttons, and fully rounded boxes
border-top-left-radiusPhysical top-left cornerThe opposite corner on the top edge
border-start-end-radiusLogical start-end cornerRTL and writing-mode-aware layouts

👀 Live Preview

A box with a rounded top-right corner, matching the reference example:

Uses width: 200px;, height: 100px;, background: lightblue;, border: 2px solid blue;, and border-top-right-radius: 20px;.

Examples Gallery

Try border-top-right-radius with fixed lengths, percentages, elliptical corners, and tab-style cards.

📚 Basic Corner Rounding

Start with a single length value to round the physical top-right corner of a box.

Example 1 — 20px Top-Right Radius

Round the top-right corner of a box with border-top-right-radius: 20px;, matching the reference tutorial.

border-top-right-radius-basic.html
<style>
  .box {
    width: 200px;
    height: 100px;
    background-color: lightblue;
    border: 2px solid blue;
    border-top-right-radius: 20px;
  }
</style>

<div class="box"></div>
Try It Yourself

How It Works

Only the top-right corner gets a 20px curve. The other three corners stay square, creating an asymmetric rounded box with a visible blue border.

Example 2 — 50% Top-Right Corner

Use a percentage value on a square box to create a deeply curved top-right corner.

border-top-right-radius-percent.css
.box {
  width: 200px;
  height: 200px;
  background-color: lightblue;
  border-top-right-radius: 50%;
}
Try It Yourself

How It Works

On a square element, 50% creates a large quarter-circle curve on the top-right corner only.

🎨 Advanced Corner Shapes

Use two-value syntax and single-corner rounding for expressive UI shapes.

Example 3 — Two-Value Top-Right Corner

Set different horizontal and vertical radii with two space-separated values, as described in the reference.

border-top-right-radius-two-values.css
.panel {
  width: 14rem;
  height: 5rem;
  background: #059669;
  border-top-right-radius: 10px 20px;
}
Try It Yourself

How It Works

The first value sets the horizontal radius and the second sets the vertical radius. This creates an oval-shaped top-right corner instead of a perfect quarter circle.

Example 4 — Tab Card with One Rounded Corner

Round only the top-right corner on a card for a tab-style UI accent.

border-top-right-radius-card.css
.card {
  border: 2px solid #cbd5e1;
  padding: 1rem;
  background: #fff;
  border-top-right-radius: 1.5rem;
  max-width: 16rem;
}
Try It Yourself

How It Works

Only the top-right corner is rounded while the other corners stay square — a common pattern for tabs, folder labels, and asymmetric card designs.

🧠 How border-top-right-radius Works

1

You choose a radius value

Set a length, percentage, or elliptical value with border-top-right-radius.

CSS rule
2

The browser targets the top-right corner

It applies the radius to the physical top-right corner of the border box only.

Physical corner
3

The corner is curved

Only the top-right corner gets a rounded arc. The other three corners stay unchanged.

One corner
=

Rounded top-right corner

Your element shows a smooth curve on the top-right while the other corners stay square.

Modern Browser Support

The border-top-right-radius property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.

Baseline · Modern browsers

Physical corner rounding in every browser

Chrome, Edge, Firefox, Safari, and Opera have supported border-top-right-radius since early CSS3.

99% Modern browser support
Google Chrome89+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari15+ · macOS & iOS
Full support
Microsoft Edge89+ · Chromium
Full support
Opera76+ · Modern versions
Full support
border-top-right-radius property 99% supported

Bottom line: Use border-top-right-radius confidently for rounded top-right corners in any modern browser.

Conclusion

The border-top-right-radius property gives you precise control over one physical corner. Use it for tab shapes, asymmetric cards, and any design that needs a single rounded corner.

Experiment with pixel values, percentages, and two-value syntax to soften the top-right corner and enhance the visual appeal of your web projects.

💡 Best Practices

✅ Do

  • Use border-top-right-radius for tab shapes and asymmetric card corners
  • Start with small radius values and increase gradually
  • Combine with overflow: hidden when clipping inner content to the curve
  • Pair with other corner longhands for fully custom corner styling
  • Use border-start-end-radius instead when RTL or writing-mode support is required

❌ Don’t

  • Expect border-top-right-radius to move to another corner in RTL layouts
  • Assume percentage radii behave like fixed pixel values on every box size
  • Use physical top-right radius when a logical property would stay correct in RTL
  • Mix too many different corner radii in one small UI without a clear design reason
  • Forget that the default value is 0 — corners are square until you set a radius

Key Takeaways

Knowledge Unlocked

Five things to remember about border-top-right-radius

Use these points when rounding the physical top-right corner.

5
Core concepts
02

Default 0

Square corner.

Default
📏03

px or %

Fixed or relative.

Values
🖼️04

Fixed top-right

Not logical.

Physical
🛠05

Longhand

Part of border-radius.

Family

❓ Frequently Asked Questions

The border-top-right-radius property rounds the physical top-right corner of an element only. The other three corners stay square unless you set them separately.
The initial value is 0, which means the top-right corner is square with no rounding.
border-top-right-radius always targets the physical top-right corner. border-start-end-radius follows writing direction and writing mode, so in RTL it may round the top-left corner instead.
Yes. Percentage values are calculated relative to the element's width and height, so the same percentage can produce different curves on different box sizes.
Use it when you want to round only the top-right corner — for tab shapes, asymmetric cards, badges, or any design that needs one custom corner.

Practice in the Live Editor

Open the HTML editor, try border-top-right-radius, and preview rounded top-right corners instantly.

HTML Editor →

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.

5 people found this page helpful