Design comparison
Community feedback
- @HassiaiPosted over 1 year ago
Replace <div class="card-container"> with the main tag and <h5> with <p> to fix the accessibility issues. click here for more on web-accessibility and semantic html
There is no need for <div class="bg-container"> in the html and its styling in the css. The image in <div class="bg-container"> should be a background-image for the body with a background size of contain and background-repeat of no-repeat. Give the body a background-color of pale bule.
For a responsive content, replace the width in .card-container width max-width and increase its value, the re is no need of a height in .card-container rather give .text-container a padding value for all the sides.
max-width: 27rem which is 432px
To center .card-container on the page using flexbox or grid,
- 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; }
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
You forgot to give the button a box-shadow value and to add the hover effect to the body.
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