Here's what you need to get you started:
http://jsfiddle.net/panchroma/pyYfG/
HTML
<div class="navbar" data-spy="affix"> <div class="navbar-inner"> .... standard navbar stuff ... </div> </div> <div id="top-shadow"></div> .... page content ...
CSS
#top-shadow { position: fixed; top: 0; left: 20px; width: 100%; height: 42px; z-index: 999; -webkit-box-shadow: 0 8px 8px rgba(0, 0, 0, 0.5); -moz-box-shadow: 0 8px 8px rgba(0, 0, 0, 0.5); box-shadow: 0 8px 8px rgba(0, 0, 0, 0.5); display: none; } .navbar.affix{ top:0; width:100%; } .navbar{ z-index:1000; }
The important bits are that I use the affix behavior to block the navbar inplace, and I apply the shadow to the new div just below the navigation bar. I think it will be easier to control what is trying to add a shadow directly to the navigation bar.
Good luck
source share