Skip to main content
Opinion4 min read

The Button Was Right There: A Small-Team Guide to Layout Shift

By The bee2.io Engineering Team at bee2.io LLC

Fix layout shift from ads, unsized images, and late-loading content with a small-team playbook for finding and testing the jumps that matter most.
Fix layout shift from ads, unsized images, and late-loading content with a small-team playbook for finding and testing the jumps that matter most.

I went to tap “Read more” and opened an ad for a shed. I live in an apartment. The website had roughly half a second to reconsider the position of its buttons, and it used that time to get me into the outbuilding market.

That’s layout shift. Something arrives late, the browser makes room, and the thing you were reading or about to tap moves. When you’re the small team responsible for the page, you can make a real dent in one afternoon. Give one person a browser, one busy page, and permission to leave the rest of the backlog alone until lunch.

1. Catch the Page in the Act

Start with a high-traffic page and a task people actually do there. Open a product page and try to select a size, or open an article and read past the first ad. Use a narrow viewport, throttle the connection in browser developer tools, and reload with the cache disabled. Then scroll. A page can behave beautifully on arrival and wait until paragraph six to drop a filing cabinet.

Record the session in the Performance panel and inspect the layout shift events. The highlighted elements tell you what moved. Look just above them for what arrived or resized at that moment. If a paragraph jumps when an ad expands, fixing the paragraph is like giving the downstairs neighbor a quieter broom.

Industry guidance puts a good Cumulative Layout Shift (CLS) score at 0.1 or lower at the 75th percentile of page visits, with mobile and desktop assessed separately. CLS is a unitless score based on the largest burst of unexpected movement. Use real-user data when you have it. A throttled recording helps you reproduce a jump and find its cause.

2. Give Late Arrivals Assigned Seating

Fix whichever culprit moves the most content or makes the main task hardest. If an ad nudges a byline but a delivery estimate shoves the buy button out from under someone’s thumb, the delivery estimate gets the first ticket. The byline can spend another afternoon being dramatic.

  • Images without dimensions. Put the image’s intrinsic width and height on the image element so the browser can calculate its aspect ratio before the file loads. Responsive CSS can still scale it to fit. If your mobile layout uses a different crop, reserve space for that crop at the mobile breakpoint. Start with the shared image component if several pages have the same problem.
  • Ads that grow after loading. Reserve space for the slot in the page’s initial layout, using the sizes you actually serve at each breakpoint. If a mobile placement serves a 250-pixel-tall ad, a 90-pixel reservation leaves 160 pixels of surprise. Test what happens when no ad fills the slot, too. Collapsing an empty slot in view can yank the page upward.
  • Late-loading content. Give a delivery estimate, recommendation widget, or similar component a placeholder sized for the content it usually displays. Test with a long real value at a narrow width. If a promo needs room above the main content, reserve that room in the initial layout or place the promo farther down where it can load without moving the controls people came to use.

3. Make the Fix Survive Tuesday

Run the same recording again at the same viewport width and connection speed. Check the task with a cold cache, then try the awkward case for the thing you changed, such as an unfilled ad slot or a delivery estimate that wraps onto two lines. Watch the control you came to use. A prettier score is small comfort if the checkout button still has a side hustle in parkour.

Save the before-and-after recordings in the ticket and add one sentence to the shared component’s documentation explaining how much space it reserves and why. That gives the next person a reason to keep the reservation when they’re tidying up the CSS on a Friday.

Open your busiest page on your phone and try the one thing visitors came to do. If something moves under your thumb, note what appeared immediately before it moved. You’ve got a first bug to file and a way to tell when it’s fixed.

Disclaimer: This article is for informational purposes only and does not constitute legal, professional, or compliance advice. SCOUTb2 is an automated scanning tool that helps identify common issues but does not guarantee full compliance with any standard or regulation.

performanceCLSlayout shiftCore Web Vitals

Stop finding issues manually

SCOUTb2 scans your entire site for accessibility, performance, and SEO problems automatically.