Design comparison
Solution retrospective
I am not able to add multiple background images so can anyone please give any solution how to do that
Community feedback
- @mdajmalshadabPosted about 3 years ago
Hey, nice work for the card section, for background part you can use the following CSS property in you main/body element
background-image: url("image-url-1"), url("image-url-2");
and then accordingly position your background usingbackground-position: left -80px top 50px, left -570px top -300px;
NOTE: These positions are random and just for example, you can position your two background images by separating it with comma.Marked as helpful1 - @mdajmalshadabPosted about 3 years ago
Another way that you can use is what I did while doing this challenge.....
I created a parent class 'bg' and its two child classes 'bg-1` and 'bg-2', following are the CSS property I used for positioning my two background images.
.bg { margin: 0; display: flex; justify-content: center; position: relative; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.bg-img-1 { position: absolute; right: 52%; bottom: 40%; }
.bg-img-2 { position: absolute; left: 50%; top: 50%; }
if you have any doubt you can refer to my github code
1 - @DamnItAzrielPosted about 3 years ago
Hey Sakshi! https://www.w3schools.com/css/css3_backgrounds.asp This link should help you! add both image url seperated with comma and ending with colon.
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