title: How to set top position using jquery
body: <p>I am creating custom div scroller and want to set top position of content div. My jquery code is as below:</p>
  
  <pre><code>containerOuterHeight=$("#messagePopUpContainer").outerHeight();
              contentOuterHeight=$("#content").outerHeight();
              contentTopPosition=$("#content").offset().top;
              alert("contentTopPosition"+contentTopPosition);
              alert(contentTopPosition-(containerOuterHeight/20));
              $("#content").offset().top=contentTopPosition-(containerOuterHeight/20);
              //$("#content").css("top",( contentTopPosition-(containerOuterHeight/20) ) + "px");
              alert("contentTopPosition"+$("#content").offset().top);
              //alert("Fontsize"+$('#content').css('font-size') );
  </code></pre>
  
  <p>and html is:</p>
  
  <pre><code>&lt;div id='messagePopUpContainer' style='background-color:#ffffff; overflow: hidden;'&gt;
  &lt;a href='javascript:void(0);' id='popupanchor' onkeydown='PopupKeyHandler("' + elmId + '");'&gt;&lt;/a&gt;
  </code></pre>
  
  <p></p>
  
  
  
  <pre><code>&lt;div id='content' style='width:350px'&gt;' + methods.settings[elmId].text + '&lt;/div &gt;
  &lt;div id='popupReturn'&gt;Return&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'
  </code></pre>