Skip to main content

How to Round Corners in CSS

Master border-radius to create rounded corners, circles, pills, and custom shapes. Click any example to copy the CSS.

Quick Reference

Border Radius Scale

Individual Corners

Round specific corners using the 4-value shorthand: top-left, top-right, bottom-right, bottom-left.

Individual Corner Properties

Frequently Asked Questions

How do I make a perfect circle?

Set equal width and height, then apply border-radius: 50%. For example: width: 100px; height: 100px; border-radius: 50%;

What's the difference between 50% and 9999px?

50% creates an ellipse based on the element's dimensions (circle if equal). 9999px is a large fixed value that creates a pill shape regardless of dimensions - useful for buttons with varying widths.

How do I round only specific corners?

Use the shorthand with 4 values (top-left, top-right, bottom-right, bottom-left): border-radius: 10px 10px 0 0; or individual properties like border-top-left-radius: 10px;