Design comparison
Solution retrospective
Hello Frontend Mentor community, this is my solution for the Four card feature section. I add animations to containers
Any feedback that can help me to improve my skills is welcome
Community feedback
- @VCaramesPosted about 2 years ago
Hey @vjeanty02, some suggestions to improve you code:
- To give you HTML code structure, you want to set up your code in the following manner (Matt Studdert recommend this layout)
<body> <header></header> <main> <section> <div class="supervisor-card"></div> <div class="team-card"></div> <div class="karma-card"></div> <div class="calculator-card"></div> </section> </main> </body>
The Header Element represents introductory content.
The Main Element identifies the main content of the document.
The Section Element can be used to wrap content that is related to each other.
And since none of the cards make sense on their own, a simple Div will do for each card.
-
The heading is one single heading so the entire thing should be wrapped in a single <h1> Heading along with a Span Element.
-
Using CSS Grid with Grid-Template-Areas will make things way easier when building the layout; it will give you full control of the layout.
Here is an example of how it works: EXAMPLE
Desktop View Code:
.card-container { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); grid-template-areas: "supervisor team calculator" "supervisor karma calculator"; } .karma-card { grid-area: karma; } .calculator-card { grid-area: calculator; align-self: center; } .team-card { grid-area: team; } .supervisor-card { grid-area: supervisor; align-self: center; }
Happy Coding! 👻🎃
Marked as helpful1@vjeanty02Posted about 2 years ago@vcarames It's a pleasure to learn new tips every day, I'll make the changes you recommended.
One other thing I would like to know: since none of the cards make sense on their own.
Do you think I can use the <article> tag instead of the <section> tag?
0@VCaramesPosted about 2 years ago@vjeanty02
Section and Article Element are the same, they only key difference, is that the article element is can stand on its own and make sense on another site.
For this challenge, neither would be suitable for each card. You can wrap all the cards in a Section Element but not the individual cards. So a simple div with a class will do.
The layout I suggest was given to me by the creator of Frontend Mentor, Matt Studdert, when I did this challenge.
Marked as helpful0@vjeanty02Posted about 2 years ago@vcarames
Okay, I get it. I will make the changes you suggested. But first, I will finish all the newbie challenges. Thanks again for your help.
0
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