Design comparison
Solution retrospective
For newbie, I still confusing with container alignment centering vertically-horizontally.
Community feedback
- @HassiaiPosted almost 2 years ago
Replace <div class="main-container"> with the main tag and <h3></h3> with <h1></h1> to fix the accessibility issue. For more on semantic html visit https://web.dev/learn/html/semantic-html/ add alt to the <img> to fix the html error issue , the value of alt is the description of the image,
There is no need to give .main-container a margin value .
Add justify-content: center to the body to center .main-container
align-items: center; centers .main-container vertically and justify-content: center centers .main-container horizontally.
Hope am helpful HAPPY CODING
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