Jump to content

Path To Find Img


jnf555
 Share

Recommended Posts

A forwardslash '/' looks in the root of your web site. Then you just type the path to the folder. For example:body {background-image:url('/folder1/folder2/bgdesert.jpg');}Of course there are other ways depending on the images relative location to the CSS file.

Link to comment
Share on other sites

Hi There, I'm having the same problem. i.e.body{ background-image:url('/images/zz-bg-21.gif');}doesn't work. The image is in my images folder, which is in the same folder as the html file.Regards, Stewart
try thisbackground-image: url('images/zz-bg-21.gif');and/or check your spelling.edit: where is the image in relation to your CSS file? Edited by thescientist
Link to comment
Share on other sites

That did the trick; missing a space before the url. I was tearing my hair out over this.Cheers, Stewart
Actually it wasn't the space that was throwing it off. It was the '/' in front of images. The forward slash refers to the root of your website. If your HTML file and the images folder are in a subdirectory of your website then you also need to include that in the path.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...