title: Navigation bar fixed after scroll?
body: <p>I have a navigation bar after header and i want that to be stuck at top of the page while scrolling down.</p>
  
  <p>can i do with <strong>position:relative</strong>?? Unlike position:fixed with the help of  the following script or any other better way?</p>
  
  <pre><code>$(window).scroll(function () {
  if ($(window).scrollTop() &gt; 100) {
      $('#header').css('top', $(window).scrollTop());
  }});
  </code></pre>
  
  <p>here is my <a href="http://jsfiddle.net/7HHa5/1/" rel="nofollow">fiddle</a>!</p>
  
  <p>black color background bar to be stuck at the top of the page </p>
  
  <p>please help me out to fix that, thank you in advance. </p>