Design comparison
SolutionDesign
Solution retrospective
Thanks for checking my solution, if you can help me to know How can I make the background image in the body element "fixed"?
Community feedback
- @besttlookkPosted over 2 years ago
HI, To tacking the background-image problem,
body{ display: flex; justify-content: center; align-items: center; min-height: 100vh; background-image: url(..url for mobile version); background-repeat: no-repeat ; background-size: cover; } @media(min-width:780px) { background-color: hsl(229, 57%, 11%) background-image: url(..url for desktop image); background-position: bottom ; background-size: 100% 50%; }
Good luck,
Happy Coding
Marked as helpful1
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