@DylandeBruijn
Posted
@ajasmine94
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 the CSS layout tool Flexbox, it will help you greatly structuring elements on your webpage. You can try centering your card for example.
-
To learn more about centering elements I recommend reading this guide.
-
You could add a
min-height: 100vh
to yourbody
element so it takes up the full height of the viewport while still being able to grow when the content inside it grows. -
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 styling your elements using classes instead of IDβs. Most of the time they are the better choice. IDβs are mostly used to select elements using JavaScript, navigation on the page itself and to style unique elements.
-
I suggest leaving the
width
of yourbody
asauto
which it is by default. So to achieve this you can remove the fixedwidth
.
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 helpful
@ajasmine94
Posted
@DylandeBruijn Hi Dylan, after learning about flexbox I have updated my solutions. It took a while but I wanted to thank you so much for the time and effort of providing this detailed feedback!! it helped greatly :)