Design comparison
Solution retrospective
Can Somebody explain why the background svgs aren't showing up? I have tried to get them to show up but they wont.
Community feedback
- @imadvvPosted about 2 years ago
Greeting Nugget!! Congratulations for completing your challenge!, πππ well done.
to fix that issue , you just need to add
./
on the being of the sourcesrc
to represent the current folder.fix-
<img src="./images/bg-pattern-card.svg" alt="">
useful resource
Hope this help!
happy codding, and have good day/night
Marked as helpful1@NuggxtPosted about 2 years ago@imadbg01 Thank you! It is such a simple fix that i was missing all along.
1 - @correlucasPosted about 2 years ago
πΎHello Nugget, congratulations for your new solution!
Answering your question:
The background is not showing because you didnt indicate the folder location with
../
-->background-image: url(../images/bg-pattern-top.svg), url(../images/bg-pattern-bottom.svg);
before the image path. Apply the changes below:body { background-color: hsl(185, 75%, 39%); display: flex; justify-content: center; align-items: center; flex-direction: column; height: 100vh; font-size: 18px; font-family: 'Kumbh Sans', sans-serif; margin: 25px; background-image: url(../images/bg-pattern-top.svg), url(../images/bg-pattern-bottom.svg); background-repeat: no-repeat, no-repeat; background-position: right 50vw bottom 50vh, left 50vw top 50vh; }
Remember, when the image is inside the repository folder use dot slash
./
and if is inside a subfolder use dot dot slash../
If the image is the same folder of the html without folder just add normal path.βοΈ I hope this helps you and happy coding!
Marked as helpful1@NuggxtPosted about 2 years ago@correlucas Thank you so much! I thought it would be something so simple and this was it!
1
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