Loading Animation of the data storage bar using JS
Design comparison
Solution retrospective
I couldn't make the desktop background work. Please suggestions will be appreciated.
Community feedback
- @DiarrahPosted over 4 years ago
The way that I solved this problem is by making a div in the HTML called "background" then put the background image inside the div. Make the picture max-width: 100% then make the container 50vh tall & position it absolutely at the bottom of the screen.
Hope to help!
1@jomefavouritePosted over 4 years ago@Diarrah I'll go through your source code. Thanks
0 - @PeresvetIvanPosted over 4 years ago
Hello, Jome. You can make a background for the body element, but for this purpose the "design" element must have a minimum height of 100vh, and you need to remove the margin-top, then the content block will automatically stand in the center of the container. After that, you can set background-size: contain and background-position: bottom on the body element for the image to lower it down. But i would advise you to set the background not on the "body" element, but on another element - for example, any div or pseudo element :before or :after with the 'absolute' positioning, this would be easier, in my opinion, because you can set the height and width of the image yourself, unlike the image in the body element, where the height can only be changed by the cover or contain properties. Try both ways and choose which one you like best.
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