I'm attempting to create a responsive navbar that is fixed at the top of the page, and with the links full height (100%) so that their background colors can change. I've so far only succeeded in making the navbar fixed, and the links are only somewhat compatible across devices. I'm going for this effect, where the media queries force the menu into a nav contained in an image. http://getbootstrap.com/examples/navbar-fixed-top/. I dislike bootstrap, and I want to be able to do this on my own in the future. Any tips?
Here is the code I have:
Jade:
head
link(rel="stylesheet", href="/main.css")
nav
ul li a(href="/") Home a(href="/about") About a(href="/contact") Contact
and
LESS:
nav {
width:100%;
height:3em;
top:0px;
left:0px;
position:fixed;
background-color:#000;
ul li a {
height:100%; text-align:center; margin-top: -3.5em; text-decoration:none; padding-right: 9%; padding-left: 9%; &:hover { color:#7f8c8d; }
}
}