Effective Uses of Background Images in Web Design
In a previous post we covered how to add background images using CSS. Now let's discuss the design perspective — when and how to use background images effectively behind your site's content.
It's become increasingly common to see full-scale images behind the content of a site. In the past, slow download speeds made this impractical. With modern broadband and image optimization techniques, full-size background images are not only possible but can be very effective — when used thoughtfully.
A background image behind your content gives the site a very different feel. It enhances the mood, can give the site an artistic quality, and — if different background images are used in different sections — keeps the site feeling fresh as visitors scroll.
Three Rules Before You Start
If you want to use a background image, keep these principles in mind:
- Your audience needs to be on broadband. Full-size background images are large files. If your audience includes people on slow or mobile connections, optimize aggressively and consider lighter alternatives.
- Blur or fade back the image if needed. The background image should not compete with the content in front of it. If the image is visually busy, apply a dark or light overlay, reduce opacity, or use a blur effect so the foreground content stays legible and prominent.
- The background is not the point. The content and imagery within the site is the point. The background image is atmosphere — it sets the stage. The moment it becomes the focus, it's doing the wrong job.
Hero Section Backgrounds
The full-width hero image at the top of a page is the most common and often most effective use of background images. A compelling hero image communicates your brand instantly — before a visitor reads a single word. For this to work: choose an image that leaves room for text overlay (usually by having a less busy area), use a dark overlay or gradient to ensure text readability, and optimize the image to load quickly (aim for under 300KB).
Section Backgrounds for Visual Variety
Using different background colors or images for different sections of a page creates visual rhythm and helps visitors understand they're moving to a new topic. A subtle texture or a solid color change can be just as effective as a full photograph.
Texture and Pattern Backgrounds
A subtle texture — linen, paper, concrete, wood grain — adds tactile quality to a site without the weight of a photograph. Patterns (geometric, organic) can add visual interest to otherwise plain sections. The key is subtlety: the texture supports the content, it doesn't compete with it.
Adding Background Images with CSS
In CSS, background images are applied with the background-image property and controlled with background-repeat, background-size, and background-position. For a full-width, non-repeating background:
.hero {
background-image: url(images/hero-photo.jpg);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
For a repeating texture across the full page:
body {
background-image: url(images/subtle-texture.png);
background-repeat: repeat;
}
See Adding Background Images for the full CSS breakdown.
What to Avoid
- Text over busy images without overlay: Always ensure sufficient contrast between text and background
- Large unoptimized files: A 5MB hero image will kill your page speed
- Auto-playing video backgrounds: Slows page load, distracts visitors, and plays poorly on mobile
- Clashing with your content: The background should support the foreground, never compete with it