Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattisbusycom/5b40bea7852bcbb04d52 to your computer and use it in GitHub Desktop.
Save mattisbusycom/5b40bea7852bcbb04d52 to your computer and use it in GitHub Desktop.
<!--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a mobile-last responsive toolbar.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Created for fun and cookies
by Jasper van der Meer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tweet/git at me on @presskode
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
this code is all yours, enjoy.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->
<div class="toolbar">
<nav>
<img src="http://placehold.it/80x80" alt="" />
<p>SpclOps</p>
<ul>
<li><a href="#">Dedicated Cloud</a></li>
<li><a href="#">Co-Location</a></li>
<li><a href="#">Systems</a></li>
</ul>
</nav>
</div>
html, body {
font-family: Arial, sans-serif;
font-size: 18px;
margin: 0; padding:0;
}
ul {
margin: 0;
padding: 0;
}
img {max-width: 100%; height: auto;}
a {
color: #fff;
text-decoration: none;
}
.toolbar {
text-align: left;
min-height: 3em;
vertical-align: middle;
padding: .5em;
color: #fff;
background: #08088f;
&:after {
content: " ";
display: table;
height: 1px;
width: 1px;
}
img, p, ul, li, a {
display: inline-block;
vertical-align: middle;
}
img {
margin-right: 1em;
}
p {
border-right: 1px solid rgba(#fff, 0.5);
padding-right: 2em;
font-weight: 300;
}
ul {
margin-left: 1em;
}
li a {
padding: 0 1em;
&:hover {
color: lighten(darkred, 15);
}
}
}
@media screen and (max-width: 700px) {
.toolbar {
text-align: center;
img {
text-align: center;
margin: 1em auto 0;
display: block;
}
p {
padding: 0 1em 0 0;
margin: 1em;
text-align: center;
}
ul {
margin-left: 0;
}
li a {
padding: 0 .2em;
}
}
}
@media screen and (max-width: 468px) {
.toolbar {
p {
border-right: 0;
padding: 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment