The background-image property doesn't seen on website, why?

The background image seen in my local server but when I upload my folders with filezilla, background image doesn’t seen.


This is folder structure.

This is file path: background-image: url(’/images/intro-bg.jpg’)

1 Like

Hi @yasinkarax,

I think the structure of your path is not correct: /images/intro-bg.jpg

/ represent root. You should specify the current repository with .: ./images/intro-bg.jpg

Or you can simply use: images/intro-bg.jpg

On my local it’s okay but on hosting server, any background properties is doesn’t seen in even chrome dev tool.

1 Like

Instead of taking a small picture of the screen, take a screenshot with the laptop, normally is the button next to F12, named PrtSc.

Such that it shows the folder structure & main.css

The url is relative to the css’ image importing file, and not to the project root, i.e where index.html.

You would have to use background-image: url("../images/intro-bg.jpg"). See for help.

No doesn’t work, now the image doesn’t seen even on local, when i upload to server the background properties doesn’t seen on devtools

Are you importing the image from style tags in the index.html? or maybe running a live server?

That may change things.

I tried both ways to add css. The image shows up on my computer but not on my hosting.
Web site yasinkara.tech

Try clean the cache of your brower. I accessed your website and the image appears for me.

1 Like