Design comparison
Solution retrospective
Hi, this is my first project on frontmentor.
I had some problems occupying the entire body. If someone has a suggestion to resolve this I'd appreciate it.
Merry christmas.
Community feedback
- @batyr-qhanPosted 11 months ago
Hello. I think it requires a little bit of restructure. I'd place nav tag outside of main.
So the layout would look like this:
<body> <header> <!-- Site header content goes here --> <nav> <!-- Navigation links go here --> </nav> </header> <main> <!-- Main content of the page goes here --> </main> <footer> <!-- Footer content goes here --> </footer> </body>
and don't forget to set:
html, body { height: 100% }
Marked as helpful0@Diego-CastilloFPosted 11 months ago@batyr-qhan thanks for the feedback I appreciate it. Just one question more:
html, body { height: 100% } set height:100% is something i should always do?
0@batyr-qhanPosted 11 months ago@Diego-CastilloF in most cases yes. It's like a basic initial styles you should always start with.
Usually this combination does work well:
* { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; }
Google more about reset CSS styles.
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