Skip to content

Instantly share code, notes, and snippets.

@james0r
Created April 12, 2020 05:43
Show Gist options
  • Save james0r/6d8560e67e3249d95d0289ee1392941e to your computer and use it in GitHub Desktop.
Save james0r/6d8560e67e3249d95d0289ee1392941e to your computer and use it in GitHub Desktop.
CSS Dropdown - Basic styling
body {
background: #262f43;
margin: 0;
padding: 0;
}
header {
height: 60px;
width: 100%;
background: yellow;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
.hamburger-container {
margin-right: 5vw;
padding: 6px 12px;
border: 2px solid #262f43;
position: relative;
& > div {
width: 22px;
height: 2px;
background: #262f43;
margin-bottom: 6px;
&:last-of-type {
margin-bottom: 0;
}
}
input[type="checkbox"] {
position: absolute;
width: 100%;
height: 100%;
top: 0;
right: 0;
bottom: 0;
left: 0;
& + nav {
display: none;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment