Design comparison
Solution retrospective
Hi, i had issues with applying the background image for desktop and issues with the responsive layout from mobile to desktop because i tried my best for the webpage to be responsive on most devices at portrait and landscape so your comments will be highly appreciated, thank you.
Community feedback
- @ovidiuantonioPosted over 4 years ago
Hello, to apply the background image you can select the body element and give it the background-image property, set it's size to cover and repeat to no-repeat, and for page responsiveness I usually use 4 breakpoints: 0-600px (mobile) 600-900px (tab portrait) 900-1200px (tablet landscape) 1200+ px the rest of devices that are bigger! Happy coding! Keep going!
1@MieibiPosted over 4 years agoThank you for the pointers but in applying the background image i actually applied it to the body element and applied those properties you listed but it didn't pull through so any other suggestion will be highly appreciated, you could check my code. Thank you.
0@ovidiuantonioPosted over 4 years ago@Mieibi If you want to apply, for example a background image and a background color at the same time you can use the background property like this:
background: url("path from the css file to image),(any color you want);
And then set the background size to be cover and repeat to no-repeat and you're done!
In your case it's like this:
background: url("../images/bg-pattern-desktop.svg"), (color);
"../" - because you are in the css folder and you want to get out of it to be able to find the images folder!
Happy coding! Keep going!
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