title: Scroll to a certain location using a Dojo ContentPanel
body: <p>My Dojo application uses a few contentpanes to display different bits of information.  The main pane has a good amount of scrollable data.  I need to be able push a button to jump to certain places.</p>
  
  <p>Currently using:</p>
  
  <pre><code>dojo.byId(iid).scrollIntoView();
  </code></pre>
  
  <p>This works perfectly except that it seems to base the calculation on the browser window top rather than the contentpanes' top.  Since my contentpane is NOT on the top of the page (There's a 50px high toolbar on top) the DIV that I'm scrolling too is 50px too high.  </p>
  
  <p>Something like this would work but scrollBy only applies to the window:</p>
  
  <pre><code>dojo.byId(iid).scrollIntoView();   //Scroll to div in quesiton
  dojo.byId(iid).scrollBy(0,50);   //scroll down 50px more to account for panes offset from window.
  </code></pre>
  
  <p>Background of complete app:
  The app uses a few dijit.layout.BorderContainer's for layout.  A user can click on the left tree to bring up an event in the right panel.  If they click on a "Target", I create all the DOM nodes in the right panel dynamically then attempt to scroll to the clicked on item.  The scrolling part works for the top and bottom nodes but is offset for the middle nodes.</p>
  
  <p><img src="https://i.stack.imgur.com/jSQkm.jpg" alt="Screen shot of complete app"></p>
  
  <p><img src="https://i.stack.imgur.com/QkNdv.jpg" alt="Illustration of my issue"></p>