A Pen by Joe Watkins on CodePen.
Created
February 17, 2014 19:54
-
-
Save joe-watkins/9057783 to your computer and use it in GitHub Desktop.
A Pen by Joe Watkins.
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
<ul class="navigation"> | |
<li><a href="#">Home</a></li> | |
<li><a href="#">About</a></li> | |
<li><a href="#">Products</a></li> | |
<li><a href="#">Contact</a></li> | |
</ul> |
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
@import "compass"; | |
.navigation { | |
list-style: none; | |
margin: 0; | |
background: deepskyblue; | |
border-bottom: 2px solid hotpink; | |
box-shadow: 0 3px 2px rgba(0,0,0,0.1); | |
display: -webkit-box; | |
display: -moz-box; | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
-webkit-flex-flow: row wrap; | |
justify-content: flex-end; | |
} | |
.navigation a { | |
color: #333; | |
text-decoration: none; | |
display: block; | |
padding: 15px; | |
color: white; | |
font-weight: bold; | |
} | |
.navigation a:hover { | |
background: darken(deepskyblue, 2%); | |
} | |
@media all and (max-width: 800px) { | |
.navigation { | |
justify-content: space-around; | |
} | |
} | |
@media all and (max-width: 600px) { | |
.navigation { | |
flex-flow: column wrap; | |
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment