Design comparison
Solution retrospective
This was my first attempt to use responsive design and change styles according to mobile and desktop views and I am not sure how correct it is.
Community feedback
- @HassiaiPosted over 1 year ago
Replace <div class="container"> with the main tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
Add the alt attribute
alt=" "
to the img tag to fix the error issue. The value of the alt attribute is the description of the image.For a responsive content, replace the width in .container with a max-width. Increase the value.
max-width: 400px
To center .container on the page using flexbox or grid, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
To center .container on the page using flexbox: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
To center .container on the page using grid: body{ min-height: 100vh; display: grid; place-items: center; }
Use the colors that were given in the styleguide.md found in the zip folder you downloaded.
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0@EleneDzneladzePosted over 1 year ago@Hassiai Thank you for your feedback. I have one question, can you specify what you mean by using the colors from the styleguide, I took colors directly from Figma which has colors with hex and is it wrong to use hex? Also, I centered the container with relative because with flex it clashed with a background pattern.
0@HassiaiPosted over 1 year ago@EleneDzneladze
the background-pattern must be the background-image of the body. Give the body a background-image with a background-size of contain and a background-repeat of no-repeat.
Change the background-image in the media query.
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