@TedJenkler
Posted
Hi @Alheri-blessing,
Nice project! Here are a couple of suggestions to improve it:
Another cool way to center a <div> is by setting the parent to position: relative, the content to position: absolute, and then using top: 50%, left: 50%, with transform: translate(-50%, -50%). This method is quite effective for centering elements.
I noticed that there is some unnecessary nesting in your code. Try to reduce the number of <div>s to keep your code clean and readable for both screen readers and other developers using tools like Chrome DevTools. A better structure would be to center the card using Flexbox on the <body>, and then use <main> with flex-direction: column so that everything stacks naturally. A bit of margin would be sufficient to achieve the desired layout.
Keep up the great work!
Best, Teodor
Marked as helpful
@Alheri-blessing
Posted
Hi @TedJenkler Thanks for your observations and correction, I will keep that in mind and also take note of the corrections.