Created
June 6, 2021 18:46
-
-
Save elcontrastador/acf716ee19790f3782ff1504c19a732e to your computer and use it in GitHub Desktop.
Module 4 - Eq Spaced Nav Items
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
## 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