The “Inside” Problem

1 · CSS-Tricks · May 20, 2019, 4:36 p.m.
So, you're working on a design. You need a full-width container element because the design has a background-color that goes from edge-to-edge horizontally. But the content inside doesn’t necessarily need to be edge-to-edge. You want to: Limit the width (for large screens) Pad the edges Center the content It's "the inside problem" in web layout. It's not hard, it's just that there are lots of considerations. The "inside" issue. Centered, max-width/padding containers inside full-width color b...