title: Can a position:fixed element with percentage width be calculated from body width?
body: <p>I have a sidebar that starts halfway down the page with position:absolute. When you scroll down and hit the top of the sidebar, some js runs to make it position:fixed, so it will stay in view as you scroll further along.</p>
  
  <p>The problem is, I wanted the width of the page to be fluid, so I made the sidebar width:25%, and the rest of the content width:75%. The body of the page has width:100% with some padding on the sides.</p>
  
  <p>This works until the sidebar gets a fixed width, all of a sudden it stretches out, now the 25% width seems to be calculated from the screen width instead of the body width. That makes sense, but it's not a desired result - I want the width to stay the same as you scroll.</p>
  
  <p>What can I do? css or js (jquery) solutions. Thanks</p>