Created
January 7, 2016 01:31
-
-
Save d1rtyvans/8d2e32b0d583270b4079 to your computer and use it in GitHub Desktop.
Fixed Navbar
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
<nav class="fixed-nav-bar"> | |
<a class="brand"> | |
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/13/Poundexclam.svg/2000px-Poundexclam.svg.png" /> | |
</a> | |
<a class="link" href="#">archive</a> | |
<a class="link" href="#">projects</a> | |
</nav> | |
<div class="page-container"> | |
<div class="post"> | |
<h2 class="link"><a>new blog</a></h2> | |
<h2 class="link"><a>sweet blog</a></h2> | |
<h2 class="link"><a>sweeter blog</a></h2> <h2 class="link"><a>new blog</a></h2> | |
<h2 class="link"><a>sweet blog</a></h2> | |
<h2 class="link"><a>sweeter blog</a></h2> <h2 class="link"><a>new blog</a></h2> | |
<h2 class="link"><a>sweet blog</a></h2> | |
<h2 class="link"><a>sweeter blog</a></h2> <h2 class="link"><a>new blog</a></h2> | |
<h2 class="link"><a>sweet blog</a></h2> | |
<h2 class="link"><a>sweeter blog</a></h2> | |
</div> | |
</div> |
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
html { | |
box-sizing: border-box; | |
} | |
body { | |
font-family: helvetica; | |
} | |
a { | |
text-decoration: none; | |
color: gray; | |
} | |
*, *:before, *:after { | |
box-sizing: inherit; | |
/* border: 1px solid red; */ | |
} | |
.fixed-nav-bar { | |
position: fixed; | |
align-items: flex-end; | |
justify-content: flex-end; | |
top: 0; | |
left: 0; | |
z-index: 9999; | |
width: 100%; | |
height: 50px; | |
background-color: white; | |
box-shadow: 0px 0px 10px gray; | |
display: flex; | |
line-height: 50px; | |
} | |
nav img { | |
height: 50px; | |
} | |
nav .brand { | |
flex: 1; | |
align-self: flex-start; | |
height: 50px; | |
margin-left: 10px; | |
} | |
nav .link { | |
flex: 1; | |
max-width: max-content; | |
margin-right: 40px; | |
} | |
.page-container { | |
margin-top: 50px; | |
margin-bottom: 100px; | |
display: flex; | |
justify-content: center; | |
} | |
.page-container > .post { | |
flex: 1; | |
max-width: 500px; | |
} | |
.post > .link { | |
text-align: center; | |
font-family: courier; | |
font-size: 2.5em; | |
font-weight: lighter; | |
margin: 50px 0px; | |
} | |
a:hover { | |
color: black; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment