0

So my header image shows up when I open Chrome from my code editor (webstorm) but after I close webstorm and open index.html manually from my project folder, the header image won't load/show up, background-image: url("/assets/heroimage.jpg"); any idea why? Same problem on github when I host my website

Thanks

2 Answers2

0

Have you tried with a "relative path" adding a point at the start?

background-image: url("./assets/heroimage.jpg");
0

as mentioned Here the problem is with how you linking the image to the CSS.

Try removing double quotes and removing unnecessary backslash: background-image: url(assets/heroimage.jpg); or background-image: url(./assets/heroimage.jpg);

Hope it helps :)