A tab on a settings panel should melt into the panel below it: rounded on top, square where it joins. A card attached to a header bar wants the opposite. Round all four corners of either one and the join looks wrong, like a sticker placed over the seam instead of a part of the same surface.

Uniform rounding is the default in most editors, which is why two-corner shapes feel oddly hard to produce. They are not. In the free Border Radius Generator on Ovatly, each corner has its own slider. Set the two corners you want, leave the other two at 0, and copy the declaration. This guide covers the corner order you need in order to read the result, the shapes two-corner rounding sits behind, and a worked tab example.

Contents

  • Quick answer
  • Why two corners is a different job
  • Corner order: clockwise from the top left
  • Where two-corner rounding shows up
  • How to round two corners, step by step
  • Worked example: a tab that joins its panel
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion
  • References

Quick answer

To round only two corners of an element, give those two corners a radius and leave the other two at 0. In the Border Radius Generator, move the sliders for the two corners you want and leave the rest at zero. The declaration lists the corners in a fixed order (top left, top right, bottom right, bottom left), so a tab with its top corners set to 20% reads border-radius: 20% 20% 0% 0%. The values are percentages of the element's own size, and the tool runs locally in your browser.

Why two corners is a different job

Four-corner rounding treats the element as a standalone object, floating on the page with nothing touching it. Two-corner rounding treats it as part of a larger surface. The sharp corners are not missing decoration; they are the corners that touch something else, and rounding them would open a visible notch at the join.

That is why the choice of pair matters more than the size of the radius. The rounded pair marks the free edge; the square pair marks the attached edge. Get the pair right and the element reads as built in. Get it wrong and no radius value rescues the shape.

Corner order: clockwise from the top left

Every multi-value radius declaration lists its corners in the same order: top left, top right, bottom right, bottom left. It runs clockwise from the top left, and once that order is in your head, a value such as border-radius: 20% 20% 0% 0% stops being a string of numbers and becomes a picture: round, round, sharp, sharp.

The generator's sliders follow the same order, one slider per corner, so what you set is what you read back in the declaration. When a hand-edited stylesheet rounds the wrong corners, the order is almost always the culprit: the values were fine, just assigned to corners the writer was not picturing.

Where two-corner rounding shows up

Tabs are the classic case. The top pair is rounded, the bottom pair stays square, and the tab sits on the panel it belongs to without a seam. Flip the pair and you have a card joined to a header bar: the header carries the rounded top corners, the card below it keeps its top corners square and rounds only its bottom pair, so the two pieces read as one block.

Chat bubbles use the same idea in a softer form. The corners on the side away from the speaker are rounded generously, while the corners on the tail side are kept tighter or square, which points the bubble at whoever said it. Badges and image frames joined to a caption strip follow the pattern too: round the free edge, square the joined edge.

How to round two corners, step by step

  1. Open the Border Radius Generator. It shows a preview element with one slider per corner.
  2. Decide which pair the design needs: the top pair, the bottom pair, a side pair, or a diagonal pair. Think about which edge is free and which edge joins something else.
  3. Move the sliders for the two chosen corners to the radius you want. Leave the other two sliders at 0.
  4. Check the preview. The rounded pair should sit on the free edge, and the square pair should look like a clean continuation of the edge it will join.
  5. Copy the single border-radius declaration into your CSS, and place the element directly against the surface it joins, with no gap or margin breaking the seam.

Worked example: a tab that joins its panel

Take a tab that sits above a settings panel. Set the top left slider to 20% and the top right slider to 20%, and leave the bottom right and bottom left at 0. The generator produces:

border-radius: 20% 20% 0% 0%;

Place that tab directly above a panel whose own top corners are square, give both the same background, and the tab reads as folded out of the same sheet of material. The curve lives only where the eye needs it, at the top.

The joined card is the same move flipped. A header bar takes the rounded top pair, and the card beneath it takes border-radius: 0% 0% 12% 12%: square where it meets the header, rounded at the bottom where it ends. One caution: because these are percentages, 20% on a wide, short tab produces a flatter curve than 20% on a square tile. If the corners look too shallow, raise the percentage and let the preview judge.

Limitations and honest tradeoffs

The generator works in percentages only and does not emit pixel values. Its own suggested bridge is to copy the declaration and replace a percentage with px as a starting point, then adjust. If your design system is specified in fixed pixels, expect that small extra step.

The declaration also rounds only the element it is applied to. Making the join convincing is layout work in your own CSS: the neighbour needs the same background, matching width and no gap at the seam. The radius cannot do that part for you.

And a corner set to 0 is genuinely sharp. That contrast is the whole effect, but it also means a one-pixel misalignment at the join is easy to see. Preview the two elements together, not the rounded one alone.

Common mistakes

  • Rounding the wrong pair. Check the corner order before copying: top left, top right, bottom right, bottom left. Most two-corner errors are order errors.
  • Setting the unwanted corners to a tiny value instead of 0. A 2% corner is still rounded and breaks the clean join. Zero is the value that joins.
  • Forgetting the neighbour. Two-corner rounding reads as one surface only if the element it joins shares its background and edges. A gap or a colour change gives it away.
  • Judging percentages like pixels. The same 20% looks different on a wide tab and a square tile, because the percentage is taken from each dimension separately.
  • Rounding the tab and the panel. If the tab's bottom corners are square, the panel's top corners should be square too, or the seam shows a notch.

FAQs

How do I round only the top two corners? Set the top left and top right sliders to the radius you want and leave the bottom right and bottom left at 0. The declaration lists the four corners in order, so the result is rounded on top and square at the bottom, ready to join the element below it.

What order do the four radius values go in? Top left, top right, bottom right, bottom left: clockwise from the top left. The generator's sliders follow the same order, so the declaration you copy matches the corners you set.

Can I round two opposite corners instead? Yes. The corners are independent, so diagonal pairs work too: top left and bottom right rounded, the other two at 0. That gives a slanted, leaf-like shape used in some card and badge designs.

Why do my rounded corners look uneven on a rectangle? The generator works in percentages, and a horizontal percentage is taken from the element's width while the vertical percentage is taken from its height. On a wide, short element the same percentage makes a wider, flatter corner than it does on a square.

Does the tool upload anything? No. The Border Radius Generator runs in your browser and produces a single CSS declaration to copy. Nothing is uploaded or stored.

Conclusion

Two rounded corners and two sharp ones is a small setting with an outsized effect: elements stop looking pasted on and start looking built in. The Border Radius Generator makes it a two-slider job, and the corner order (top left, top right, bottom right, bottom left) lets you read any declaration at a glance. If the units themselves ever feel slippery, our explainer on border radius values, percentages, pixels and the pill shape goes deeper. For more guides in this series, see our Website and Webmaster Tools guides, which pair each technique with the free tool that performs it.

References