Design comparison
Solution retrospective
Hi! I think I did some spaghetti code in the Styled component Container. If anyone can give me any suggestions it would be a great help. Thanks!
(I know that the responsive is not the best, I will try to improve it in the next challenge)
Community feedback
- @LukaKobaidzePosted almost 3 years ago
Hello! on the
<a>Learn More</a>
element, instead of using some specific valuemargin-top: 12rem
, you can usemargin-top: auto
, this will push the element to the bottom of the container, from there usemargin-bottom: some value
.This will prevent element from overflowing.
Marked as helpful1@Rtf747Posted almost 3 years ago@LukaKobaidze Wow! That was very helpful! I spent some time trying to align all three <a>. I still don't really know when to use "auto" measures. I have to keep practicing. Thanks a lot!
0 - @bramuccciPosted almost 3 years ago
Hi rummer! If you see your solution on a screen of 1024px (like mine) you will see that the buttons get out of the card. I think I can help with that.
- First, do
*{ margin: 0, padding: 0}
. With that you can work better with the spacing. - Remove the
grid-template-rows
of your container. Just leave thegrid-template-colums: 1fr
- Put the background in the cards, and no in the div inside them. Then, add a padding. With this structure you can adjust the elements like header, img, etc.
- I see that you use react. I recommend to go back to the bases with only css and html. Keep coding!
Marked as helpful1@Rtf747Posted almost 3 years ago@bramuccci I don't know what happened to me, but that grid is very bad for me, I'm going to try to follow your recommendations to see if I do much better on the second try! Thank you so much!
1 - First, do
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