Design comparison
Community feedback
- @correlucasPosted about 2 years ago
👾Hello Olha, congratulations for your new solution!
I saw that your code is a litte bit long, and you can fix that with a quick html structure cleaning, You can build this with a simple approach, without using unnecessary divs, all you need is a single
<main>
or<div>
to keep all the content inside, and nothing more. The ideal structure is thediv
and only the image, heading and paragraph.A simple html structure for this challenge:
<body> <main> <img> <h1></h1> <p></p> </main> </body>
To make the container align vertically use the
flex properties
below:body { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
👋 I hope this helps you and happy coding!
Marked as helpful0@zakharchevnaPosted about 2 years ago@correlucas Yeah… I see… ok, I will change my structure Thanks for helping 🙏
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