Skip to content
Every tutorial here is 100% free — and always will be
LSLovableStudent

How do I make sections full width?

Last checked 31 Aug 2026

Short answer

Remove the container's max-width constraint for that section and make its background span the full viewport width, while keeping the inner content in a centred, max-width column for readability.

Full-width background, contained content

Most "full width" requests actually mean: the background colour/image should reach both screen edges, but the text and buttons inside should stay readable in a centred column (not stretch edge-to-edge on a wide monitor). Ask for both parts explicitly:

Make the hero section's background span the full width of the viewport, but keep the text and CTA inside a centred column with a max-width of around 1200px.

How it's typically structured

  • The outer wrapper gets full width (w-full, no max-w-*, no side margins) and holds the background colour or image.
  • An inner wrapper keeps max-w-7xl mx-auto px-4 (or similar) so content doesn't stretch uncomfortably wide on large screens.

Truly edge-to-edge content

If you actually want the content itself (not just the background) to reach the edges — a full-bleed image gallery, for example — say so explicitly, since it's a different and less common request:

Make the image gallery section completely edge-to-edge, including the images themselves, with no side padding at any screen size.

What usually goes wrong

  • Asking for "full width" without specifying whether the content should also stretch — Lovable may either leave content narrow or overstretch it. Be explicit about which parts.
  • Removing a container's max-width globally instead of for one section, which can break other pages that depended on that shared container.
  • Full-width sections with edge-to-edge padding that disappears on mobile, causing text to touch the screen edge — recheck mobile after this change.

Sources

Was this answer helpful?

Related questions

Website made, maintained and hosted by PromptSites.com

PromptSites logo