with the help of HTML CSS and JS (help with background- image)
Design comparison
Solution retrospective
"Stick to it, it does get better", another project completed and happy to how far I have come... any feedback is always welcome!
oh one more thing, I could not figure out how to get the background images working, I guess my question is <how do you separate the top and bottom background images via Css or is it all applied in html first?>
thank you in advance :-)
Community feedback
- @nakoyawilsonPosted almost 3 years ago
You can add more than one background-image by separating the url sources with a comma and then you can do the same with background position. The code would look like:
body { background-image: url(./images/bg-top.svg), url(./images/bg-bottom.svg); background-repeat: no-repeat, no-repeat; background-position: right top, left bottom; }
Also in your media query you have the wrong path for your background image. You have
background-image: url(/src/images/bg-top.svg);
instead ofbackground-image: url(./images/bg-top.svg);
Marked as helpful2@stfnpczkPosted almost 3 years ago@nakoyawilson @danM51 one little side note for the
background-repeat
property, you only need to setno-repeat
once, it gets applied for both svgs. :)0 - @Aishwarya-DhuriPosted almost 3 years ago
You can also use pseudo elements on container for background images like &:before for top background image and &:after for bottom one
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