JSFiddle - React, Tailwind, and code Playground
by otunik
HTML
<ul class="navigation">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Insights</a></li>
<li><a href="#">FAQ</a></li>
</ul>
CSS
.navigation {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-end;
align-items: center;
}
@media all and (max-width: 400px) {
.navigation {
flex-direction: column;
flex-wrap: wrap;
align-items: stretch;
padding: 0;
}
.navigation a {
text-align: center;
padding: 10px;
border-top: 1px solid rgba(255,255,255,0.3);
border-bottom: 1px solid rgba(0,0,0,0.1);
}
.navigation li:last-of-type a {
border-bottom: none;
}
}
@media all and (max-width: 800px) {
.navigation {
justify-content: space-around;
}
}
.navigation {
list-style: none;
margin: 0;
background: blue;
}
.navigation a {
text-decoration: none;
display: block;
padding: 1em;
color: white;
}