Design comparison
Solution retrospective
I used grid display.
There is a weird issue in mobile view where the content extends outside the scrollable area of the viewport/window. I'm not sure what's causing it aside from misunderstanding padding/margin. (fixed)
I'm unable to add padding to the buttons without distorting the radius, cause the 'pill' to have flat edges on left/right. (fixed)
Community feedback
- @MelvinAguilarPosted about 2 years ago
Hi @hemzi ๐, good job on completing this challenge! ๐
Here are some suggestions you might consider:
Regarding your first question:
- Use
min-height: 100vh
tobody
selector, with this property you set a height and let the element grow even more if necessary.
Here are some other suggestions:
- The
Learn More
elements should beanchor
tags and not buttons because they redirect to another part of the page. - Use
margin: 0.938rem
ormargin: 15px
in the.cards
selector so that it has some space when viewed on mobile devices. - In other solutions, If you intend to use buttons and you have 'flat edges", add padding and increase the border-radius.
- Instead of using pixels in font size on the body element, use relative units of measure like
rem
orem
. The font size in absolute length units (px) does not allow users with limited vision to change the text size in some browsers. Reference.
I hope those tips will help you.
Good job, and happy coding!
Marked as helpful1@hemziPosted about 2 years ago@MelvinAguilar do you have a reference for determining when to use anchors vs. buttons?
0@MelvinAguilarPosted about 2 years ago@hemzi Hi!
An anchor tag (<a>) should be attached if the element redirects to a section of the same page or an external one.
A button can be used to perform the functionality of an interactive element, such as displaying a modal, sending information, changing or calculating data, etc.
More info: Button versus Link
0 - Use
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