Cant get my background image visible

pls, tell me why it doesnt work

Are you sure the path to the background image is right? That’s an odd path…

yes, i had it in img before, recently moved it to another folder when it doesnt worked.

you can see in the uploaded image to the lft that the path is correct.

It looks to me like the path should be ../nuncio1.png

thank you, it worked out,

Yes, the path in the css should be relative to the css file requesting it.

Using a relative or even an absolute path has always confused me because the image expects a URL and not a path.

Well… the background-image property will accept a relative path, an “absolute” aka “root-relative” path, or a URL with equal ease. Internetter’s creative terminology causes the most grief.

The relative path in the CSS to the resource should be relative to the CSS file requesting it, exactly as SamA74 stated.

The absolute or root-relative path is relative to the root of the web site.

The URL is a Universal Resource Location that begins with the universal address of the web site and is immediately followed by the root-relative path to the desired resource.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.