Submitted almost 2 years ago
3-column preview card component using Flexbox
@Clive-Chambers
Design comparison
SolutionDesign
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there ๐. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML ๐:
- You should use the
<a>
tag instead of the<button>
tag because theLearn More
button is a link to another page. Use buttons to perform actions like submitting a form or closing a modal and use links to navigate to another page. You can read more about this here ๐.
CSS ๐จ:
-
When using a media query there is no need to repeat all the styles, just overwrite the ones you need.
main.container { width: 100%; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 40px auto; } @media screen and (min-width: 514px) { main.container { /* width: 100%; */ /* min-height: 100vh; */ /* display: flex; */ flex-direction: row; /* NOTE: Only this is necessary in the media query. */ /* align-items: center; */ /* justify-content: center; */ /* margin: 40px auto; */ } }
I hope you find it useful! ๐
Happy coding!
Marked as helpful1@Clive-ChambersPosted almost 2 years ago@MelvinAguilar
Thank you for your feedback i have now switched the buttons to anchor tags and have removed the unnecessary media query properties.
1 - You should use the
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