Design comparison
Solution retrospective
i am getting better with using CSS, i am proud of that.
What challenges did you encounter, and how did you overcome them?i had the challenge of designing the links, could not quite decide if i should use buttons or just links, i used buttons and then wrapped the links inside the buttons however i had difficulty styling it. so i had to use just the links and style them like buttons.
Community feedback
- @DylandeBruijnPosted 4 months ago
@Kaytorah
Hiya! π
Congratulations on your solution, it looks very close to the design! I can tell you put a lot of effort into it.
Things you could improve βοΈ
-
I suggest adding a bit of
padding
to yourbody
element so the card has some space around it on smaller viewports. -
Try experimenting with CSS variables, they help you make your CSS values more reusable across your code.
-
I suggest using clear descriptive CSS classes like
.card
,.card-title
and.card-description
. -
Try using semantic HTML elements like
main
,section
andarticle
. -
Try using using relative CSS units like
rem
andem
they make your layout more adaptable. -
Be careful with setting a fixed
width
andheight
on your elements. If the content in these elements grows beyond these restrictions youβll run into overflow issues. Keeping theheight
atauto
- whichblock
elements are by default - will be fine in most cases. -
You donβt need to put
width: 100%
onblock
elements, they already take up the full width of their parents by default. -
Try putting your links in a list (
ul
) to make your code more semantic. You made the right choice usinga
tags for your links. Generally you would usea
tags if you want to link to a different page or website and buttons if you want something to happen on the page. You can makea
tags look like a button which is what you want to do here.
Example of code:
<ul> <li> <a href="#">Github</a> </li> </ul>
I hope you find my feedback helpful! π
Let me know if you have more questions and I'll do my best to answer them. πββοΈ
Happy coding! π
Marked as helpful2@CelineJamesPosted 4 months agoThank you, I will try all these out@DylandeBruijn
0 -
- @SamOwensPosted 4 months ago
Looks good!
Other feedback has most points covered, but the one I would add is that you should include
aria-label
attributes to your links for better accessibility. You can read more about them here - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelMarked as helpful1@CelineJamesPosted 4 months agoThanks for this link, itβs like you read my mind. I was going to go read about it now, Smile.@SamOwens
0 - @Bamo-D-AbdallahPosted 4 months ago
A button does some functionality on the web page.
But link navigates you somewhere.
In the project they are links leading you some other place so you made the right decision to use links.
Some CSS notes:
- avoid uisng px, use rem instead.
- there is no need to set height on your elemets.
- don't set fixed
width
in the normal design, setmax-width
in@media
to control the width of the element in different screen sizes.
Marked as helpful1
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