Design comparison
Solution retrospective
I struggled with getting the background to be the same as the challenge. Any tips on how to achieve this would be appreciated! Also unsure of the use to HTML tags, whether article and sections were used correctly?
Community feedback
- @adityaphasuPosted over 1 year ago
Hi! Nice job completing the challenge!ππ»
For the background image you can add this to the body:
body{ background-color: hsl(225, 100%, 94%); background-size: contain; background-repeat: no-repeat; }
-
What this code snippet does is that it sets a
background-color
to the body along with the background image that you have set, thebackground-size
is set tocontain
which scales your bg-image to fit within the body, preserving its aspect ratio and thebackground-repeat
is set tono-repeat
which makes sure the bg-image doesnt repeat. -
As for your question , <article> tag is used to represent standalone content (content that can make sense on thier own). In this case its just an order summary (we know its for music but listen to them from which application or website? do we know which company? etc. ) it has very limited info so I think it should be a <section> which is basically used to group related content and since here all the content is related to each other it makes more sense to use it instead of an article.
I hope this cleared your doubts about the usage of tags in your project and help you fix the background!
Happy coding!πΊπ»
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