A gallery grid looks tidy in the mockup and ragged on the real page. One thumbnail has square corners, the next has a heavy round, a third sits somewhere in between, because each image picked up its styling at a different moment with a different value. The fix is boring and reliable: decide on one border-radius value, build it once, and let every image in the grid share it.

This guide uses the free Border Radius Generator on Ovatly to build that value. The generator works in percentages rather than pixels, and that choice has a real consequence for a grid whose thumbnails appear at more than one size. The sections below state the trade plainly: you get identical proportions on every image, not an identical pixel curve.

Contents

  • Quick answer
  • Why one shared value keeps a grid uniform
  • Percentages scale with each thumbnail
  • How to build the radius, step by step
  • Worked example: one value across a twelve-photo grid
  • The circle case for square thumbnails
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion
  • References

Quick answer

Set every corner to the same percentage in the Border Radius Generator, copy the single border-radius declaration it produces, and apply that one declaration to every image in the grid through a shared CSS class. Because the value is a percentage of each image's own size, a large thumbnail gets a proportionally larger curve and a small one gets a smaller curve: the same look, scaled. Square thumbnails pushed to 50 percent on every corner become circles.

Why one shared value keeps a grid uniform

A grid reads as one object. Visitors take in the whole block rather than inspecting thumbnails one at a time, and mismatched corners register as carelessness even when nobody could name what is wrong. Mixed radii usually come from inline styles added image by image over time.

One shared declaration removes the drift. Every image points at the same class, the class holds one border-radius value, and a later design change means editing that one line instead of hunting through a page of markup. The class lives in your stylesheet; the generator's job ends at producing the declaration.

Percentages scale with each thumbnail

The generator's values are percentages of the element's own size, so the same number produces a bigger curve on a bigger image. Ten percent on a 300 px thumbnail is a 30 px curve. Ten percent on a 150 px thumbnail is a 15 px curve. The proportion is identical, the pixel count is not.

For most galleries that scaling is exactly right. A small thumbnail with a full-size curve would look over-rounded, almost circular, while a large thumbnail with a tiny curve would look nearly square. Percentages keep the family resemblance at every size the grid renders, including a phone layout that shrinks each cell.

The trade cuts the other way when a design spec demands the same fixed curve, say exactly 12 px, on every image regardless of size. Percentages cannot promise that. The generator's own FAQ offers a bridge: take the percentage declaration, replace the % with px as a starting point, and adjust from there. You lose the automatic scaling and gain a fixed curve.

One more consequence matters for mixed grids. On a non-square image, a percentage radius resolves separately against width and height, so the corner is an ellipse rather than a circular arc. A 300 by 200 px thumbnail at 10 percent gets a 30 px horizontal radius and a 20 px vertical one. On photos it looks fine.

How to build the radius, step by step

  1. Open the Border Radius Generator. It gives each corner its own slider, in the order top left, top right, bottom right, bottom left.
  2. For a uniform grid, set all four corners to the same value. The per-corner sliders also allow shapes that deliberately differ, such as a rounded top with a square bottom.
  3. Leave Fancy mode off for a photo grid. Fancy mode enables elliptical corners, with separate horizontal and vertical radii written in slash syntax; the generator's own example (horizontal 30, 70, 70, 30; vertical 30, 30, 70, 70) produces an organic blob. Fun for decorative shapes, wrong for thumbnails.
  4. Copy the single border-radius declaration from the output and put it on the shared class in your stylesheet:
.gallery-grid img {
  border-radius: 10%;
}
  1. Reload the grid and check it at its largest and smallest rendered sizes, not just the desktop size you designed at.

Worked example: one value across a twelve-photo grid

Take a portfolio grid of twelve photos. On desktop each thumbnail renders at 300 by 300 px; on a narrow two-column phone layout each renders at 150 by 150 px. You build the radius once: all four corners at 10 percent, which produces the declaration border-radius: 10%;.

On desktop, each corner curve measures 30 px across and 30 px down; on the phone layout, the same declaration gives 15 px curves. The two sizes look like the same design at two scales, which is the goal. No second rule was written for the small layout, and a thirteenth photo added next month inherits the same corners the moment it uses the class.

Now change the value to 50 percent and the same square thumbnails turn into circles, which is why profile and avatar grids use exactly this setting. One shared value covers the whole range, and nothing else in the markup changes.

The circle case for square thumbnails

The circle fails quietly. Every radius at 50 percent on a square element is a circle; the same setting on a rectangle is an ellipse, stretched along the longer side. Mix square and landscape thumbnails at 50 percent and the landscape images come out as ovals, not circles.

So circles require square images first: crop or size the thumbnails square in your layout, then apply the 50 percent value. The generator cannot make a rectangle round.

Limitations and honest tradeoffs

The generator outputs percentages only. There is no pixel output, and the replace-with-px bridge is a starting point for hand-tuning, not an exact conversion.

The tool produces a declaration, not styled images. It never touches your image files or writes your stylesheet. Applying the value through a shared class is your CSS work.

Percentages scale, which is the feature and the limitation in one. A grid rendering thumbnails at wildly different sizes will show noticeably different curve sizes, even though the proportions match. If that bothers your design, fixed pixel values in your own CSS are the honest answer.

Everything runs locally in your browser. Nothing is uploaded, and there is no saved state; close the tab and you rebuild the value from the sliders.

Common mistakes

  • Styling images one at a time. Inline styles with slightly different values are how grids drift apart. One class, one value.
  • Expecting identical pixel curves from a percentage. The proportion matches; the pixels scale with each image. Want fixed pixels? Write fixed pixels.
  • Rounding the grid container instead of the images. The container's corners round; the thumbnails inside keep their square corners and poke against them.
  • Setting 50 percent on rectangular thumbnails and expecting circles. Rectangles give ellipses. Circles need square elements.
  • Leaving one corner different by accident. Per-corner sliders make a stray value easy. Check all four before copying the declaration.

FAQs

Should every image in a gallery use the same border-radius value? Yes, if you want the grid to read as one designed set. Build one value, copy the single declaration, and apply it to every image through a shared class. One value in one place also means one place to change later.

Why do corners look bigger on large thumbnails than on small ones? Because the value is a percentage of each image's own size. Ten percent of a 300 px thumbnail is a 30 px curve; ten percent of a 150 px thumbnail is 15 px. The proportion matches, the pixel count does not.

Can the generator give me a radius in pixels instead? No. It outputs percentages only. Its own suggested bridge is to take the percentage declaration and replace the percent sign with px as a starting point, then adjust the number by eye in your stylesheet.

How do I make circular gallery thumbnails? Start with square images and set every corner to 50 percent. A square element with 50 percent on all four corners is a circle. On a rectangle, the same setting gives an ellipse instead.

Does the tool edit or upload my image files? No. It produces a CSS border-radius declaration and runs fully in your browser. Your image files are never touched; the rounding happens when the browser renders the page.

Conclusion

A uniform gallery grid is one decision, made once: a single radius value, built in the Border Radius Generator, shared by every image through one class. Percentages keep that value proportional at every size your grid renders, and 50 percent on square thumbnails takes you all the way to circles. When the problem is not the grid but a single image escaping the rounded card that contains it, our comparison of border-radius vs overflow hidden covers that other half. For more guides in this series, see the Website and Webmaster Tools guides.

References