I just started learning about web development and I got this issue about loading image from CSS file. I already tried many solutions that I can find in stack overflow but still doesn't work.
I tried to click on the URL: images/banner.jpg
on vs code but it said: an error occur while loading an image. But then when I try to use the same path with <img src="images/banner.jpg" alt="banner">
, it still loads
enter image description here
Just need to set ../
in image path like below:
background: url(../images/banner.jpg);