Design comparison
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 and give it a value to fix the error issue. The value of the alt attribute is the description of the image. For decorative images like icons, there is no need to give it an alt value, for more on alt attribute Click here.The body has a wrong background-color , give it a background-color of light-gray
Give h1 and p the same font-size of 15px which is 0.9375rem, text-align: center, the same margin-left, margin-right and margin-top values. Give p a margin bottom value.
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
To center .box on the page using flexbox, replace the height in the body with min-height: 100vh.
For a responsive content which wont require a media query for this challenge,
- Give .box a fixed max-width and padding value for all the sides.
max-width:320px padding:16px
- give the img a max-width of 100% and a border-radius value, the rest is not needed.
Marked as helpful1@YusufabdulmuizPosted over 1 year ago@Hassiai I didn't get the "responsive content" part. I tried the code but doesn't work. Kindly help me on that
0@HassiaiPosted over 1 year ago@Yusufabdulmuiz let me know where you have the issues.
- Give .box a max-width and padding values as provided earlier , a background-color of white and a border-radius value. -Give the img a max-width of 100% for a responsive image and a border-radius.
Using max-width will shrink the element as the screen size reduces.
0 - Give .box a fixed max-width and padding value for all the sides.
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