I couldn’t have done it without your input Jason so thank you!!!
I forgot to post the HTML so I have merged the CSS and HTML into the one file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
<title>FlexBox Test</title>
<style>
html,
body {
font: normal 1em/1.5 Verdana;
background: #222;
color: #fff;
height: 100%;
display: flex;
flex-direction: column;
}
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
header {
display: flex;
}
header h1, header nav {
flex: 1 0 auto;
}
header,
footer {
background: #333;
padding: 0.5em 0.25em;
}
header {
border-bottom: 0.2em solid deepskyblue;
flex-wrap: wrap;
}
/* header h1 { background: red;}
header nav { background: blue;} */
header label {
display: none;
font-weight: bold;
font-size: 2em;
background: red;
/*padding: 0 0.25em;*/
}
header label:hover {
color: #000;
background: greenyellow;
}
header input {
display:none;
}
footer {
border-top: 0.2em solid deepskyblue;
}
footer a {
color: inherit;
}
main {
padding: 1em;
flex: 1 0 auto;
}
nav {
text-align: right;
padding: 0.5em;
}
nav li {
display: inline-block;
}
nav li a,
nav li span {
font-weight: bold;
text-decoration: none;
color: inherit;
padding: 0.25em 0.5em;
}
nav li span {
color: #888;
}
nav li a:hover {
color: #000;
background: greenyellow;
border-radius: 0.25em;
}
@media only screen and (max-width: 60em) {
body {}
nav {
display: none;
}
header label{
display: block;
}
#showMenu:checked ~ nav {
display: block;
text-align: center;
width: 100%;
}
}
</style>
</head>
<body>
<header>
<h1>myHeader</h1>
<label for="showMenu">≡</label>
<input type="checkbox" id="showMenu">
<nav>
<ul>
<li><a href="">Link #1</a></li>
<li><span>Active</span></li>
<li><a href="">Link #2</a></li>
</ul>
</nav>
</header>
<main>
<section>
myContent
</section>
</main>
<footer>
<section>
© 2020 myCopyright<br><a href="">myFooter</a>
</section>
</footer>
</body>
</html>