Dasmotos Arts & Craft project background image not loading

No, your directory structure is very good!

If you feel like you need practice with it, I would go through the navigating the command line course.

1 Like

Will do. Thanks again for all your help.

I am getting the same problem and none of the solutions here are helping. I am using VC

HTML:

    <h1 class="title">Dasmoto's Arts & Crafts</h1>

CSS:
.title_div {

background-image: url("C:\Users\OurNews Online\OneDrive\Documents\Codecademy\Dasmoto\images\CSS1.jpeg");

}

I resorted to using the full URL but it won’t help

Hi,

Incredibly often in programming backslashes are used as escape keys. This means that they escape the following 1 character. For this reason for urls it’s better to use a forward slash.

Hi there,
I have built the web on html, but when came to css I have got stuck on linking the index.html document to the index.css
please can I get help on this?

Hi please share your code if you wish for someone to help you specifically. (Also note that you should format it before you paste it. The instructions are here: [How to] Format code in posts)

I was having the same issue… as most people were. If i used the full path which is discouraged it displaed fine. I didnt have my images in their own folder, althogh I am sure that is best practice, it doesnt seem like there will be any other “resources” in this folder for htis project.
“…/pattern.jpeg” worked for me in the end. Thank you to all.

hello, i’m replying here as i seem to be having a similar issue but can’t figure out what’s wrong.

none of the .webp images are loading on my page, only the .jpeg (paint. image) loads. all pictures are loading fine if i click into them separately in VS code however i can’t open them in my local folder (saved to my desktop) - the picture just doesnt open. i’m not sure if i’ve saved it wrong but the fact that it opens in VS code would make me think that it’s been saved ok.

here is my code:


@damdam-lab and @ruby5657632607 (sorry if you’ve already solved this ruby, I just saw your post).
If you are both using VSCode, one thing I’ve found really helpful is allowing the program to help with filling in the locally stored files.
What I mean by that, is if you type in "url(’ " and then begin typing what you believe to be the correct path, you should see VSCode offer you options that are available to complete that path. If you don’t see the path you are looking for, then you likely are typing it incorrectly. Then you can experiment with staring with “.” or “/” or “./” etc. until you find the file you are looking for.
I struggle with local paths, and regularly look up how to do it properly, and have found this to be helpful in making sure I use the correct local path.
I hope this helps you both. Happy coding!

2 Likes

Hi there!
I’m having same problem, I’ve been trying to figure out what’s wrong but I don’t know what’s happening!?!?
I’ve tried differents paths and followed all of your advice, but nothing is working.
Please help! :slight_smile:

Try ../img/pattern1.jpeg.

Reason: The single dot just takes you to resources/ but you want to get to Dasmoto/ which holds your img/ folder.

1 Like

I got it, this worked, finally, now I understand it better :slight_smile: thanks

3 Likes



I’m having issues with the banner and having the colors of the headings come forth. WHen I use DEVTOOLS on the site and try to change, the change works. I’m not sure where in my code it is incorrect

i figured out that my link to css was not correct and everything is showing up! but I am still having issues with the main banner. i cannot get the image under the text. just under it

i cannot get the image under the text. just under it

I’m not sure I fully understand what you are having problems with. Can you expand on the problem?

Hey are you able to show your folder structure, also i can see that for the banner section you have added the image in the index.html file as well as the index.css file, it should only be in the index.css file and needs to have the correct reference depending on how you set up your file structure, so for example “…/images/pattern.webp”

Hi Everyone,

I’m New Here. Can someone tell me what is wrong for my background path here?

Thank you.

Hi Victory Alex,
I did an hour of trial and error and finally came up with the following path:

…/Images/pattern.jpeg

However, my images are in a separated “Images” folder that is inside “Resources”, at the same level as the “css” folder. In your case, it seems that you’ve put the images folder INSIDE the css folder. That would make the path different. Consider moving the images to their own “images” folder that lives inside “resources”.

1 Like

This worked for me too! Forgot to go one level up in the folder structure :slight_smile:

thanks! I almost lost a hair or two :sob: :sob: :sob: