0

This is how everything is organized:

enter image description here

I'm trying to access an image in a subfolder from a css document

I've tried these, but none of them Work

background-image: url('../images/topimage.jpg');
background-image: url('/images/topimage.jpg');
background-image: url(/images/topimage.jpg);

 This is the structure

 MyMovieVlog
        Home
            Home.html
            Home.css
        images
            topimage.jpg
c0der
  • 15,550
  • 6
  • 26
  • 53
  • Assuming that you open that html file directly in a browser you, the url is the path to the file on your machine, something like `file://...`. See also: https://stackoverflow.com/questions/855614/what-are-the-ways-to-make-an-html-link-open-a-folder If you don't want to do that, you can look into using a static file server: https://gist.github.com/willurd/5720255 – jns Apr 06 '20 at 22:00

1 Answers1

1

background-image: url('../images/topimage.jpg'); should be correct for your case. Can you go into the developer tools on your browser and try opening the image there?

enter image description here

Painguin
  • 766
  • 11
  • 22