Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Background Image Not Showing Re: [Solved] Background Image Not Showing

#70028
Rob MacKay
Participant

as another note its also case sensitive. so image.jpg isn’t the same as image.JPG….

As for the file question:

typically people have a file structure like this

public_html/css/style.css (public_html is the root folder where you put your files for the site – It is normally called something different on each host or even just shown as a "/").

if you type this in your CSS – "background: url(images/bg.jpg)"

your stylesheet will be trying to pull the images from public_html/css/images/bg.jpg – You just have to remember its finding the image relative to its file structure.

when you do the magical ../ your jumping back up a level then trying to find the images folder.

So background: url(../images/bg.jpg) would jump you up a level out of the css folder back into the htdocs or public html folder (whatever your host calls it) – and then look for the images folder… so you would be looking for:

public_html/images/bg.jpg