Design comparison
SolutionDesign
Solution retrospective
I could not figure out how to center the entire card! Any feedback on that would be great. Thank you!
Community feedback
- @denieldenPosted over 2 years ago
Hi Bobby, great work on this challenge! 😉
Here are a few tips for improve your code:
- use
main
tag to wrap the card and improve the Accessibility, not for the inside card content - add descriptive text in the
alt
attribute of the image - remove all unnecessary code, the less you write the better as well as being clearer: for example the
header
tag container of image - remove all
margin
from.card-body
class - use flexbox to the body to center the card. Read here -> best flex guide
- add
transition
on the element with hover effect - instead of using
px or %
use relative units of measurement likerem
-> read here
Overall you did well 😁 Hope this help!
Marked as helpful0 - use
- Account deleted
hi there,
remove all the margin from the card div and give the body these properties to center the element
display:flex justifiy-content:center align items: center min-height:100vh flex-direction:column
- check the HTML report to fix accessiblity issues
i hope this is helpful and goodluck!
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