Skip to content

Instantly share code, notes, and snippets.

@kccnma
Last active June 18, 2019 19:18
Show Gist options
  • Save kccnma/2e9015fe45701b63747f8a8440cb023b to your computer and use it in GitHub Desktop.
Save kccnma/2e9015fe45701b63747f8a8440cb023b to your computer and use it in GitHub Desktop.
Summer Favorites Site - Structural Styling
/* GLOBAL */
* { box-sizing: border-box; }
body {
font-family: sans-serif;
margin: 0;
}
a {
text-decoration: none;
color: darkred;
}
/* HEADER */
header {
background: black;
color: white;
padding: 1em 2em;
}
header a {
color: white;
}
header {
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
}
/* SITE ID */
.site-id h1 {
margin: 0;
}
/* SITE NAV */
nav ul {
display: flex;
justify-content: flex-end;
margin: 0;
padding-top: .6em;
}
nav li {
margin: 0;
list-style: none;
}
nav a {
display: block;
padding: 1em;
}
/* FOOTER */
footer {
border-top: 1px solid #ddd;
max-width: 1000px;
margin: 0 auto;
}
footer nav ul {
justify-content: center;
}
/* MAIN */
main {
padding: 0 0 3em 0;
min-height: 80vh;
}
/* SECTIONS */
section {
padding: 3em 1em;
}
/* HERO */
.hero {
display: grid;
align-content: center;
text-align: center;
background: darkred;
min-height: 50vh;
color: white;
}
.hero h2 {
font-size: 6em;
text-transform: uppercase;
margin: 0 auto;
}
.hero p {
max-width: 600px;
margin: 1em auto;
}
/* Lists */
.lists {
max-width: 1000px;
margin: 0 auto;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-column-gap: 1em;
}
@media (max-width:767px) {
.lists {
grid-template-columns: 1fr 1fr;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment