Question: Repl folders not loading in content
In html i am trying to get a file in a folder but it wont load in, even though i have the right file path. The src i have selected is Flags/ca.png. Why won’t this work? ca.png is a file. Here is my code:
<main><img src="Flags/ca.png"><h2>Canada</h2></main>
1 Like
Hi @Chase305 , welcome to the forums!
Try any of these and see if they work:
<main><img src="/Flags/ca.png"><h2>Canada</h2></main>
Or:
<main><img src="./Flags/ca.png"><h2>Canada</h2></main>
Hope this helps!
for some reason neither of those work either.
Could you send a screenshot of what is inside the Flags
folder?
Thanks!
Hi! The list of items in the folder is too long to screenshot it all, but here is the portion with the image:
Maybe try:
<main><img src="Flags\ca.png"><h2>Canada</h2></main>
using a backslash?
dang it! This doesn’t work either… in some areas like in script tags when i add it using jquery, it sets bugs out the code.
I’m stumped. Is ypur program a pure HTML, CSS, JS program or is it something with a backend (Flask, Express)?
no there are no backend things just html css and javascript as far as im aware. Could this be an issue on replits side? If you create a new project, do you have the same issues?
Trying to test it but I get Not Found
. Maybe you could try forking this repl and test it?
what is forking? How should i “fork” it?
When you are in the cover page, press the Fork and Run
button in green.
i can load that image in, which i renamed ca.jpg. Im so confused
Try forking your own repl and test it.
At the top-left corner of your repl (be inside the editor), click on the name, then Fork. Try running the forked version.
the forked project of your forked project runs fine
Can you please provide a link to your Repl? That way we’re going in a little less blindly. Follow the guide below to share it:
To share your code with others, you can simply link to your repl or paste and format the code into your post!
Linking to a repl
The easiest way to share your code is by linking to your repl. You can find the link by clicking on your repl title, clicking on Cover page, and clicking the button to copy the URL.
NOTE: only share repl join links or use the invite button with people you trust!
Sharing short code samples
Share a snippet of your code by wrapping it in backti…
here is my project: https://replit.com/@Chase305/Geoguessr-Tips?v=1 look on the “Find” page there is the code
No, I meant forking your original repl, not my repl.
I see the Canadian flag just fine (it’s just huge):