title: how to keep header of content div fixed?
body: <p>I have a web page built in angularjs .</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body ng-app="app1" ng-controller = "ctrl1"&gt;
  
  &lt;header&gt;&lt;/header&gt;
  
  &lt;div ng-view&gt;&lt;/div&gt;
  
  &lt;footer&gt;&lt;/footer&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here the header and footer is always fixed, but in content section when I am doing routing and in one of the view I have header which I always want to be fixed.</p>
  
  <p>The problem is when use <code>position:fixed</code> for that content header and while moving the scroll of main page , the content below the header seems to move upwards.</p>
  
  <p>so my question is how can I create that header in such a way that while scrolling down the content section or main section the header should always be fixed.<a href="https://i.stack.imgur.com/0To79.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0To79.png" alt="enter image description here"></a></p>
  
  <p>Any help is appreciated  !!!</p>
  
  <p>Thanks </p>