Design comparison
Community feedback
- @HassiaiPosted over 1 year ago
Give the alt attribute in the img a value. 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.
There is no need to give the body a background-position rather give it a background-size: contain and a background-color of pale-blue.
To center .card on the page using flexbox or grid instead of margin:
- USING FLEXBOX: add min-height:100vh; display: flex; align-items: center: justify-content: center; to the body
body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
- USING GRID: add min-height:100vh; display: grid place-items: center to the body
body{ min-height: 100vh; display: grid; place-items: center; }
For a responsive content, there is no need .card a height value rather give the img a height and width of 100%, this will prevent the content from overflowing on smaller screens. Replace the width in .card with max-width and increase its value
max-width 416px which is 26rem/em
.There is to give .card_text a margin 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 and here
Hope am helpful.
Well done for completing this challenge. 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