Design comparison
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there ๐. Good job on completing the challenge !
Update all images by adding a dot (.) at the beginning of the src attribute.
Do:
<img id="primary_img" src="./images/image-tanya.jpg" ...>
Instead of:
<img id="primary_img" src="/images/image-tanya.jpg" ...>
When the path starts with a forward slash '/', it's an absolute path that refers to the root directory of the website. On the other hand, when the path starts with a dot and a forward slash ./, it's a relative path that refers to the current directory. It is relative to the location of the HTML file.
I hope you find it useful! ๐
Happy coding!
1@JetyunPosted almost 2 years agothank you, i found the source of the problem already. i used to only insert "image/picture" without "/", so this problem never occurred to me before.
0@JetyunPosted almost 2 years agothank you, i found the source of the problem already. i used to only insert "image/picture" without "/", so this problem never occurred to me before.
0@JetyunPosted almost 2 years ago@MelvinAguilar may i ask another question? what about bg-[url('../images/pattern-bg.svg')]? i tried to put one dot, two dots, no dots, no slash, none works
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord