Design comparison
Solution retrospective
I dont know how use pattern background..
Community feedback
- @OhSorrowPosted about 2 years ago
Hey dude! I hope this piece of code helps you to use the background pattern:
body { background-image: url(THE PATH OF PATTERN); background-repeat: repeat-x; background-size: contain; height: 100vh; }
The path inside the
url()
parentheses , is the path of the pattern image.Please let me know if you have any questions.
Happy coding!
Marked as helpful0 - @DavidMorgadePosted about 2 years ago
Hello Diego, congrats on finishing the challenge! your card looks awesome and its almost the same as the solution!
The only thing you are missing is the background-image, this is easy to add, try adding this to your body:
body { background-color: hsl(225, 100%, 94%); background-image: url(../images/pattern-background-desktop.svg); background-size: cover; background-repeat: no-repeat; }
Let me explain what I did here: ->
background-image
gets the background image displayed on the body ->background-size
means how much size should your bg image have, in this case is covering ->background-repeat
setting it to no repeat, means that the image does not repeat!With this you will have your image for desktop sizes, I recommend you to try adding your self also the pattern for mobile screen sizes playing with those properties!
Hope my feedback helps you, if you have any questions don't hesitate to ask!
Marked as helpful0
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