The “Inside” Problem
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.
Source: The “Inside” Problem, an article by Chris Coyier.