title: CSS. Element position change after scroll
body: <p>Let's say I have two <code>div</code>s. The first one is fixed header and the second is relative position ad. After scroll, the ad gets inside header. The ad should stick to the header and they both return to  a normal page flow, that I could scroll down that like other content. I believe you've got my idea.</p>
  
  <p>At this moment I have no specific code, just brainstorming. One idea is to use jQuery <code>window.scroll()</code> and <code>window.scrolltop()</code> functions to detect window position and when change CSS. But how to stick that ad and return to normal flow???</p>
  
  <p>I've googled, browsed answers here but couldn't find any valuable info. If you have any ideas or info I'd be grateful.</p>