Design comparison
Solution retrospective
Good challenge. Not so hard but anyway I had some problems with background images. It doesn`t change by using @media. I need to study more to understand how it is working.
Community feedback
- @MelvinAguilarPosted about 2 years ago
Hi @Masunsa π, good job completing this challenge! π
I have some suggestions you might consider to improve your code:
- Use the
<main>
tag to wrap all the main content in your solution instead of using<div class="container">
.
- Instead of using pixels in font size, use relative units of measure like
rem
orem
. The font size in absolute length units (px) does not allow users with limited vision to change the text size in some browsers. Reference.
- Solve the errors presented in the report of this solution.
- You could use the CSS backgrounds properties to set the background:
body { . . . background-color: hsl(225deg, 100%, 94%); background-image: url(./images/pattern-background-desktop.svg); background-repeat: no-repeat; background-position: left top; } html { /* background-color: #e0e8ff; */ /* Remove this color here */ }
background-color
Set the background color.background-image
Set a background image.background-repeat
Sets if a background image will be repeated along the horizontal and vertical axes, or not repeated at all.background-position
Sets the starting position of a background image.- You can also specify the size of the background image with background-size
The background property is shorthand for all the properties mentioned above:
background: hsl(225deg, 100%, 94%) url(./images/pattern-background-desktop.svg) no-repeat left top;
And to change it in the media query:
@media screen and (max-width: 500px) { body { background-image: url(./images/pattern-background-mobile.svg) } }
References:
Above all, the project is done wellπ. I hope those tips will help you! π
Good job, and happy coding! π
Marked as helpful0@MasunsaPosted about 2 years ago@MelvinAguilar Thank you for this detailed reply. I really appreciate it. I had some problems with background properties. Now it is fixed. Have a nice day π
1 - Use the
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