Guides › HTML / PHP sites › Forms, plugins & updates

CSS: Background Image Not Showing: Paths and Height

Backgrounds.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Forms, plugins and checkout

A CSS background image that does not show usually has a wrong path, no height on its container, or an unsupported property.

1Check the path2Check the container height3Check the properties4Check the file type and name5Check specificity and overrides6Check caching7Test in another browserFixed? Test the site. If not, get help.
The steps in order. Work down the list and stop when the problem is solved.

Step 1: Check the path

Illustration for Step 1: Check the path

The url() in CSS is relative to the CSS file, not the HTML page. Open the image address in the browser to confirm it loads.

Step 2: Check the container height

Illustration for Step 2: Check the container height

An empty element has zero height, so a background has no space to show. Set min-height or add content.

Step 3: Check the properties

Illustration for Step 3: Check the properties

You normally need background-image, and often background-size: cover and background-position: center.

Step 4: Check the file type and name

Illustration for Step 4: Check the file type and name

Case and spaces matter. Avoid spaces in names.

Step 5: Check specificity and overrides

Illustration for Step 5: Check specificity and overrides

In F12, Elements, Styles, see whether another rule overrides yours.

Step 6: Check caching

Illustration for Step 6: Check caching

Hard reload and clear CSS caches.

Step 7: Test in another browser

Illustration for Step 7: Test in another browser

Some formats such as WebP or AVIF need fallbacks.

Still stuck?

If these steps do not solve it, we fix it for you for a flat $99. Full refund if we do not solve it within 7 days.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-22.