Design comparison
Solution retrospective
Im unsure why the card isnt lined up with the solution. The code should be having the card centered with the height of the screen. Any advice would be much appreciated!
Community feedback
- @vanzasetiaPosted over 2 years ago
Awesome work on this challenge! Your solution looks great even on a mobile landscape view! It's responsive! 👏
About the card vertical alignment, I think the issue is the
padding
on themain
element. Try to reduce it and generate a new screenshot to see the effect.Some areas that can be improved.
- Always use CSS to uppercase the text. Uppercased text in HMTL might be spelled letter by letter by screen readers (unless it is the desired effect).
- I suggest using link elements for the Learn more buttons because I think those buttons would navigate the user to another page instead of triggering something. So, what do you think it's going to happen if the user clicks the button?
For your information, to work easier with the
img
element, I highly suggest making it a block element and addingmax-width: 100%
because by default theimg
element is an inline element which makes it hard to work with.I hope this helps! Keep up the good work! 👍
Marked as helpful1@kpax10Posted over 2 years ago@vanzasetia Thank you so much for this. Really great recommendations here!
0@kpax10Posted over 2 years ago@vanzasetia Have you come across an issue where the github pages solution looks different than the solution frontendmentor displays? My solution looks correct on Github pages, but the solution here has the 'Learn More' buttons floating up higher in the card.
0@vanzasetiaPosted over 2 years ago@kpax10 You're welcome! 👍
Sometimes the GitHub page takes more time to update the changes so if you generate a new screenshot before the new changes get updated/built then it will show a different thing on the Frontend Mentor.
Regardless of the GitHub page issue, the "Learn More" buttons are positioned near the text (floating up higher in the card) because of the
height
of the card and thedisplay: flex
on the parent element. I don't think you need flexbox to align the elements inside the card. Also, never specify theheight
of the card elements, let the elements inside it dictate the height of the card. So, I would recommend adding somemargin-top
on the link element and may adjust thepadding
if needed.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