Skip to content

Instantly share code, notes, and snippets.

@efetigrel
Created August 15, 2022 10:30
Show Gist options
  • Save efetigrel/253fe42be76d816953958a69b692d972 to your computer and use it in GitHub Desktop.
Save efetigrel/253fe42be76d816953958a69b692d972 to your computer and use it in GitHub Desktop.
Css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-size: 20px;
}
body {
font-family: Arial, Helvetica, sans-serif;
}
.container {
margin: auto;
background: url("img/bg.jpeg") no-repeat center right/cover;
color: white;
height: 100vh;
}
.main-nav__logo {
width: 70px;
padding: 10px;
}
.topnav {
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden;
}
.topnav #myLinks {
display: flex;
}
.topnav a {
color: white;
padding: 25.9px;
text-decoration: none;
font-size: 20px;
}
.topnav a.icon {
background: white;
display: none;
position: absolute;
right: 0;
top: 0;
}
.topnav a.icon:last-child {
background: black;
}
.topnav a.icon:last-child:hover {
background: white;
}
.topnav a:hover {
color: black;
}
@media (max-width: 768px) {
.topnav {
display: block;
}
.topnav #myLinks {
display: none;
}
.topnav a {
display: block;
}
.topnav a.icon {
display: block;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment