title: CSS position fixed. Div wrapper must be fixed vertically but must be varying in horizontally
body: <p>I have a div , something like this</p>
  
  <pre><code>  #footer
     {   position:fixed;
         left:40px;
         top:0px; 
     }
  </code></pre>
  
  <p>The position is fixed when I scroll vertically or horizontally. But i want the div to be fixed  when user scrolls the scroll bar vertically but should be varying when user scrolls the scroll-bar horizontally.</p>
  
  <p>I have seen some of the forums and posts but mostly I found jquery script.I want to know if there is a way to do it in CSS? </p>
  
  <p><a href="https://stackoverflow.com/questions/4176432/fixed-position-in-only-one-direction-with-css">Fixed position in only one direction</a>
  I read this post but I did not understand the jquery script. Kindly let me know the way to do it in css or the better way to do it with jquery.Thanks</p>