Created
February 16, 2019 03:44
-
-
Save fwgreen/a91db42a656eed9d99193829468dc4f9 to your computer and use it in GitHub Desktop.
Basic html5 page with stylesheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Web Page</title> | |
<link rel="stylesheet" href="styles.css"> | |
<meta name="viewport" content="width=device-width"> | |
</head> | |
<body> | |
<main> | |
<header>header</header> | |
<nav>navigation</nav> | |
<article>article</article> | |
<footer>footer</footer> | |
</main> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 0px; | |
} | |
@media screen and (max-width: 40em) { | |
main { | |
height: 100vh; | |
width: 100%; | |
display: grid; | |
grid-template-columns: 1fr 4fr; | |
grid-template-areas: "header header" "article article" "footer footer" "nav nav" | |
} | |
} | |
@media screen and (min-width: 40em) { | |
main { | |
height: 100vh; | |
width: 100%; | |
display: grid; | |
grid-template-columns: 1fr 4fr; | |
grid-template-areas: "header header" "nav article" "footer footer" | |
} | |
} | |
header { | |
grid-area: header; | |
background: lightblue; | |
} | |
footer { | |
grid-area: footer; | |
background: lightcoral; | |
} | |
nav { | |
grid-area: nav; | |
background: lightgoldenrodyellow; | |
} | |
article { | |
grid-area: article; | |
background: lightgreen; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment