October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Build an Asymmetric Bento Grid with CSS Grid and Flexbox

Use CSS Grid to arrange asymmetric tiles, then use Flexbox for one-dimensional content inside them. Start with a single-column layout and redefine the grid at wider breakpoints.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build an asymmetric bento layout with CSS Grid: use rows and columns to give the most important tiles more space, and use Flexbox inside tiles when their contents need to line up in one direction. Keep the HTML in a sensible reading order, start with a one-column mobile layout, and change the grid structure at wider-screen breakpoints instead of forcing a desktop composition onto narrow screens.

Plan the tiles and their reading order

Start with the content, not the shape of the grid. Decide what each tile contains, which tile deserves the most visual space, and the order a reader should encounter the material. Put the tiles in that logical order in the HTML. CSS can change where a tile appears visually, but it does not change the document order used by assistive technology or sequential keyboard navigation.

As an Amazon Associate I earn from qualifying purchases.

For example, a featured topic can come first in the markup, followed by secondary topics and compact links. That sequence should still make sense when the layout collapses to a single column.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build a single-column baseline

Make the narrow-screen layout the starting point. A simple stack keeps every tile readable when there is not enough width for a multi-column composition.

#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option
<section class="bento" aria-label="Featured topics">
  <article class="tile tile-featured">Featured topic</article>
  <article class="tile tile-secondary">Secondary topic</article>
  <article class="tile tile-tertiary">Another topic</article>
  <article class="tile tile-compact">Compact link</article>
</section>
.bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  grid-template-areas:
    "featured"
    "secondary"
    "tertiary"
    "compact";
}

.tile-featured  { grid-area: featured; }
.tile-secondary { grid-area: secondary; }
.tile-tertiary  { grid-area: tertiary; }
.tile-compact   { grid-area: compact; }

The source order and the one-column area map agree, so the baseline requires no visual rearrangement.

Give the featured tile more room with Grid

CSS Grid is designed to coordinate two-dimensional arrangements: it defines rows and columns, sizes their tracks, and places items into them. At a width that can support the content, replace the single-column map with a composition that gives the featured tile more cells than its neighbors.

@media (min-width: 48rem) {
  .bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "featured featured secondary"
      "featured featured tertiary"
      "compact  compact  tertiary";
  }
}

In this illustrative map, the featured tile occupies a two-column-by-two-row region; the tertiary tile spans two rows; and the compact tile takes the first two columns of the last row. The map is an example, not a universal bento pattern. Choose tracks and spans based on the actual content, the minimum usable width of each tile, and the intended reading path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use named areas for a readable map

grid-template-areas makes the composition visible at a glance. Repeating an area name makes that tile span multiple cells. Each named area must form a rectangle, and every row in the map must contain the same number of cells. Use a period (.) for an intentionally empty cell.

Named areas are useful when the layout has a small set of meaningful regions that designers and developers need to recognize. For repeated or programmatically placed items, explicit grid-column and grid-row line placement may be more convenient. Either approach can be used in the same layout.

Choose tracks that can shrink

Flexible tracks such as 1fr divide available space among columns. Pairing them with minmax(0, 1fr) allows a track to shrink below its automatic minimum when needed, which can help prevent long content from forcing a column wider than the container. Still check the rendered tiles: text, images, and embedded content need enough room to remain usable.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

Redefine the composition at responsive breakpoints

Do not simply squeeze a desktop arrangement as the viewport narrows. Change both the number of columns and the area map when the available width no longer supports the existing tile proportions. A layout may move from one column to two and then to three as the content permits; the breakpoint should reflect where the actual tiles remain comfortable, not an assumed device category.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

MDN’s common-layout example demonstrates changing from a single-column map to two- and three-column maps, while using Flexbox for navigation within the Grid layout. See MDN’s guide to realizing common layouts using grids for that responsive pattern.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use Flexbox inside a tile when content flows in one dimension

Grid handles the overall arrangement of tiles. Flexbox is a good fit for a component whose children flow and align along a single axis, such as a row of buttons, metadata, or navigation links.

.tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

Here, Flexbox arranges the actions within their tile and allows them to wrap when space is limited. It complements Grid rather than replacing it: use Grid for the coordinated rows and columns of the composition, and Flexbox for one-dimensional alignment inside a component. For the underlying distinction, see MDN’s CSS flexible box layout guide.

Set tile proportions without clipping content

The aspect-ratio property expresses a preferred ratio for a box. Its effect on preferred sizing applies when at least one dimension is automatic, so it is not a substitute for considering both track sizing and content. It can help create consistent image or media shapes, but a fixed-looking ratio on a content-heavy tile can leave too little room for its text and cause overflow. Test the tile at the widths and content lengths it will actually encounter. See MDN’s aspect-ratio reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check visual placement, reading order, and keyboard focus

Grid placement changes where content appears on screen; it does not reorder the source sequence used for non-visual reading or sequential keyboard navigation. The CSS Grid Layout specification, as quoted in MDN’s grid accessibility guide, says: “Grid layout gives authors great powers of rearrangement over the document.” The same passage cautions that visual rearrangement does not change non-visual reading order or sequential keyboard navigation.

Quick Recap

SaleBestseller No. 1
HTML and CSS: Design and Build Websites
HTML and CSS: Design and Build Websites
HTML CSS Design and Build Web Sites; Comes with secure packaging; It can be a gift option
$14.94
SaleBestseller No. 3
SaleBestseller No. 4
Web Design with HTML, CSS, JavaScript and jQuery Set
Web Design with HTML, CSS, JavaScript and jQuery Set
Brand: Wiley; Set of 2 Volumes
$35.05
  • Read the HTML in source order and confirm the sequence makes sense without the visual grid.
  • At each layout breakpoint, tab through interactive tiles and check that focus follows a sensible path.
  • If visual order and focus order feel disconnected, change the source order or simplify the visual rearrangement rather than relying on placement to communicate meaning.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.