Yeah, I had the same problem.
I found out that the relative path that I was using is didn’t account for where the CSS file is. So i had to go up two directories “…/…/” then set the path for the image. Like this:
After that it worked.
I was having the same problem and what solved my case was writing the complete image address:
even if a top folder, like ‘/home/’, is removed the background image wouldn’t display anymore.
Hey everybody! I am looking for some help adding a background-image to an h1 element in the Web Development Foundations, Developing Websites Locally unit. Specifically the Dasmoto’s Arts & Crafts project. I have tried every version of the relative path I can think of.
I originally started with background-image: url(“images/pattern.jpeg”);
then tried background-image: url(“resources/images/pattern.jpeg”);
then tried background-image: url(“dasmoto/resources/images/pattern.jpeg”);
then tried background-image: url(“projects/dasmoto/resources/images/pattern.jpeg”);
then tried background-image: url(“codeacademy/projects/dasmoto/resources/images/pattern.jpeg”);
then tried background-image: url(“documents/codeacademy/projects/dasmoto/resources/images/pattern.jpeg”);
lastly, I tried then tried background-image: url(“…/…/resources/images/pattern.jpeg”);