Grids and cards that don’t line up
When a grid ends with one item alone on its last row, cards in a row have different heights or buttons at different heights, its images have different shapes, or a box sits inside another box, the page looks unfinished.
Why it matters
Visitors compare cards side by side, so every step and gap draws the eye away from what the cards say.
How to fix it
- Fill the last row of each grid, or change the number of columns so it comes out even: six items in three columns, not seven.
- Make the cards in a row the same height with each card’s button at the bottom, and crop their images to one shape, such as square or 4:3.
- Where a card sits inside another box, remove the inner card’s border or shadow.
On WordPress
- Select the Gallery block and set Columns so the last row is full.
- Set Aspect ratio to one shape, such as Square.
WordPress help: Customize gallery settings (opens in a new tab)
On Shopify
- In the theme editor, click the section with the grid and set Columns so the last row is full.
- Set its images to one ratio, such as Square.
Shopify help: Customizing sections in the theme editor (opens in a new tab)
On Wix
- Click the gallery, click Settings and choose Grid in the Layout tab.
- Click Customize Layout, set Thumbnail resize to Crop, choose Set items per row and set Images per row so the last row is full.
Wix help: Choosing a layout (custom vs. presets) (opens in a new tab)
On Squarespace
- Click Edit Section on the gallery section and choose Grid: Simple in Gallery Type: images in even rows and columns.
- Below Gallery Type, set the number of columns so the last row is full.
On Hostinger
- Click the gallery, click Edit gallery and choose the grid layout, which shows every image as a square.
- Set the number of images per row so the last row is full.
Hostinger help: How to add an image gallery in manual mode (opens in a new tab)
On Webflow
- Select the grid and, in the Style panel, change the number of columns so the last row is full.
- In the Style panel’s Size section, set each image’s Ratio to one shape, such as Square, and its Fit to Cover.
In code (HTML, CSS or Tailwind)
- Set the columns so the last row fills:
grid-template-columns: repeat(3, 1fr)for six items (Tailwindgrid-cols-3). Items in a grid row stretch to the same height. - Make each card a column with its button pushed to the bottom, and crop its image to one shape. In Tailwind:
flex flex-colon the card,mt-autoon the button,aspect-4/3 w-full object-coveron the image..card { display: flex; flex-direction: column; } .card .button { margin-top: auto; } .card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
Check your fix
Once the change is live, check the page again.