Skip to content

Instantly share code, notes, and snippets.

@elcontrastador
Created June 6, 2021 18:46
Show Gist options
  • Save elcontrastador/acf716ee19790f3782ff1504c19a732e to your computer and use it in GitHub Desktop.
Save elcontrastador/acf716ee19790f3782ff1504c19a732e to your computer and use it in GitHub Desktop.
Module 4 - Eq Spaced Nav Items
## Josh Solution
<style>
ul {
display: flex;
flex-direction: column;
align-items: center;
}
a {
display: block;
padding: 8px;
}
@media (min-width: 300px) {
ul {
flex-direction: row;
justify-content: space-evenly;
}
}
</style>
<nav>
<ul>
<li>
<a href="">Home</a>
</li>
<li>
<a href="">Browse</a>
</li>
<li>
<a href="">Contact</a>
</li>
</ul>
</nav>
## My "list-less" solution
<style>
nav {
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
}
a {
padding: 8px;
}
@media (min-width: 300px) {
nav {
flex-direction: row;
}
}
</style>
<nav>
<a href="">Home</a>
<a href="">Browse</a>
<a href="">Contact</a>
</nav>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment