I'm having trouble utilizing the full height of my webpage. It seems to only be using about 40% of the page's height. I tried setting the HTML and body heights to 100%, but that didn't work. I then attempted to allocate 20% to the header, 70% to the section, and 10% to the footer. However, I realized that this would cause my text to not be vertically centered. How can I achieve the desired layout?
<style>
* {
box-sizing: border-box;
border: 0;
}
html, body {
height: 100%;
}
header{
background-color: blue;
padding: 30px 0;
text-align: center;
font-size: 30px;
}
section {
display: flex;
}
nav, article {
border: solid 1px black;
clear: both;
background-color: aqua;
}
nav {
flex: 1;
padding: 20px;
background-color: darkslateblue;
}
article {
text-align: center;
padding: 10px;
flex: 4;
}
footer {
border: solid 1px black;
background-color: crimson;
padding: 10px;
text-align: center;
}
</style>
</head>
<body>
<header>hello!</header>
<section>
<nav>
<ul>
<li><a href="">1</a></li>
<li><a href="">2</a></li>
<li><a href="">3</a></li>
<li><a href="">4</a></li>
</ul>
</nav>
<article>
<h2>hello</h2>
<p>hello how are you?</p>
</article>
</section>
<footer>this is footer</footer>