How to make the navigation bar always upstairs?

I am using Foundation from ZURB and trying to get the top navigation bar.

+6
source share
5 answers

If you use funds, you can use:

 <nav class="top-bar fixed"></nav> 
+8
source

I have no idea what these things are, but this is how you fix something in place, regardless of the scroll position of the window with CSS:

 #navbar { position: fixed; top: 0px; width: 100%; }​ 

See here: http://jsfiddle.net/qC2Dt/

+7
source

use style:

 position:fixed; top:0px; 
+1
source

You can also use the class created at boot time.

  <nav class="navbar-fixed-top"> 
+1
source

Addendum to Alex Wayne's answer:

I found it necessary to add a z-index with a sufficiently large number so that the navigation bar is always displayed on top of other elements.

 #navbar { z-index: 10000; position: fixed; top: 0px; width: 100%; }​ 
+1
source

All Articles