3-column preview card using HTML, CSS and Vanilla javascript
Design comparison
Solution retrospective
how can i best align the 3 cards to side by side besides the method i use?
-The technologies for this particular project is only HTML and CSS but i decided to spice things up by using Javascript to dynamically display the cards
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Anita, Congratulations on completing this challenge!
Nice solution and nice code! I can see that you paid a lot of attention to your code/design. If you don’t mind I’ve some tips for you:
1.Your solution seems fine, you did a really good job wrapping the content for these 3 cards. Something you can improve here is to use a
single class
to manage the content that is mostly the same for the 3 cards (paddings, colors, margins and etc) and another class to manage the characteristics that are different (colors and icon), this way you'll have more control over then and if you need to change something you modify only one class.2.Use
max-width: 100%
for the cards in the mobile version to allow the cards grow 100% of the width considering the paddings and avoid to have a lateral gap (limited by a fixed width).3.Improve your html markup using meaningful tags to wrap the content, you can replace the div you’ve used for each card with <article>. Remember to wrap big blocks of content with semantic tags and never divs, use divs for small blocks.
✌️ I hope this helps you and happy coding!
Marked as helpful0 - @FabzusPosted about 2 years ago
Hello @neetauka!
Your design looks amazing and the fact that you used Js to show the cards it's a nice touch.
I recommend this clip from Fireship: https://www.youtube.com/shorts/njdJeu95p6s.
If I could suggest one thing, if you don't want the text to jump when you hover over it you could modify the border
button{ border:2px solid var(--Very-light-gray); }
button:hover{ border:2px solid var(--Very-light-gray); }
This way the text won't jump anymore.
Have an amazing day and happy coding! Have fun!
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