Five CSS Layout Techniques That Actually Work for Local Business Sites in 2026

Use container queries so components respond to their parent, subgrid to align card rows, flexbox with gap for simple rows, CSS grid for page structure, and clamp() for fluid type and spacing. Skip frameworks. These cover nearly every local business layout and stay fast on mobile.
Part of the complete web design guide.
On this page
Most local business sites don’t need a JavaScript framework to look good. They need a layout that loads fast on a phone in a parking lot and doesn’t break when the owner’s nephew adds a sixth service to the menu. These five techniques cover what I reach for most often when I build or fix sites for small businesses.
1. Container queries instead of viewport breakpoints
For years we sized everything off the viewport. That falls apart the moment a card shows up in two different places: full width on the homepage, half width in a sidebar. Container queries let a component respond to its own parent, not the whole window. Every current browser supports them now, so there’s no reason to keep guessing.
.card-wrap {
container-type: inline-size;
}
.card {
display: grid;
gap: 1rem;
}
@container (min-width: 30rem) {
.card {
grid-template-columns: 12rem 1fr;
align-items: center;
}
}
Now the same card works in a narrow column and a wide one without a single media query. For a site with a services grid, a testimonial block, and a footer promo, that’s one component instead of three near-copies.
2. CSS subgrid for aligned card rows
Uneven card heights are the tell of a hand-rolled grid. Subgrid is fully supported in 2026 and it solves the alignment problem cleanly: let the children inherit the parent’s rows so titles, body text, and buttons line up across every card.
.services {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
gap: 1.5rem;
}
.service {
display: grid;
grid-row: span 3;
grid-template-rows: subgrid;
}
.service h3 { grid-row: 1; }
.service p { grid-row: 2; }
.service a { grid-row: 3; align-self: end; }
No flexbox hacks, no fixed heights, no JavaScript measuring anything. The buttons sit on the same line no matter how long the descriptions run, which matters a lot when the copy comes from a busy owner who writes three sentences one week and one the next.
3. Logical properties so RTL and mobile just work
Stop writing margin-left and padding-right. Logical properties describe spacing in terms of the text flow, which means the same stylesheet handles right-to-left languages and vertical writing without a second file. It’s also less to think about when you’re matching a design.
.hero {
padding-inline: 1.25rem;
padding-block: 3rem;
margin-inline-start: auto;
border-inline-start: 4px solid var(--brand);
}
I switched to these a while back and haven’t missed the old directional properties. It’s a small habit that pays off the first time a client’s site needs to serve a bilingual audience.
4. Fluid type with clamp() and a sane scale
You don’t need a font-size media query for every breakpoint. A single clamp() per heading level gets you smooth scaling from a phone to a desktop, and it reads better than jumping between fixed sizes.
:root {
--step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
--step-1: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
--step-2: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
}
h1 { font-size: var(--step-2); line-height: 1.15; }
h2 { font-size: var(--step-1); line-height: 1.25; }
p { font-size: var(--step-0); line-height: 1.6; }
Two rules of thumb: keep the middle value tied to a viewport unit so it actually moves, and cap the maximum so a headline doesn’t swallow the screen on an ultrawide monitor.
5. Grid for the page shell, flexbox for the small stuff
For the overall page I use a simple named grid, then drop into flexbox for inline groups like nav links or a button with an icon. Mixing them isn’t a mistake; they’re good at different things.
body {
display: grid;
grid-template-rows: auto 1fr auto;
min-block-size: 100dvh;
}
.site-nav ul {
display: flex;
flex-wrap: wrap;
gap: 0.75rem 1.5rem;
list-style: none;
}
.cta {
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
Using 100dvh instead of 100vh is the one detail people still miss. On mobile Safari, vh measures the tallest possible viewport and pushes your footer off screen behind the browser chrome. dvh tracks the visible area and fixes it.
A note on keeping it fast
None of this needs a build step. A single stylesheet using these techniques will usually beat a stack of utility classes plus a runtime, and it’s easier for the next person to read. That matters for small business sites where the person maintaining it might be the owner, or a developer they hire once every two years. If you’d rather hand the whole thing off, that’s the kind of work I do as a Long Island web design project, and the same layout principles apply whether you’re in Commack or anywhere else.
FAQ
Do I still need media queries at all?
Sometimes. Use them for big structural shifts, like a sidebar that disappears on narrow screens. For component sizing, container queries and clamp() handle most of it.
Is subgrid safe to use in 2026?
Yes. It’s supported in all current major browsers. If you need to support something older, fall back to a flex row, but that’s rare now.
Will these techniques improve my search rankings directly?
Not by themselves. But faster rendering, stable layout, and less code all help Core Web Vitals, and those do factor in. The bigger win is a layout you can maintain without breaking things every time content changes.


