Background shape to outline container

How to use it

Put a shape behind a container that would otherwise be invisible against the page background.

When to use it

This is mostly for visual interest. The fact that the container has the same background as the page means that it blends in better with the page as a whole. This means this technique is useful if you want to highlight a container but not so much that you’d use a high-contrast background colour for it.

I’ve used a heavily blurred shape in the example below, but there’s no reason you can’t use a solid shape.

What to watch out for

There’s a nice background-merging effect to the sides of the container if you make sure the background shape doesn’t take up the full width of the screen.

Examples