title: How to dynamically calculate the positioning width of a fixed div element using the width of browser and width of the body
body: <p>I'm using the following CSS Styling for two div's that will place skyscraper ad's on my website to the left and right of the body.</p>
  
  <pre><code>/*-----Sky Scraper ad----*/
  #SkyAdLeft{
   width: 160px;
   display: block;
   position: fixed;
   top: 100px;
   left: 10px;
    height: 600px;
   z-index: 7;
  }
  #SkyAdRight{
   width: 160px;
    display: block;
   position: fixed;
   top: 100px;
   right: 10px;
   height: 600px;
   z-index: 7;
  }
  </code></pre>
  
  <p>I want each DIV to remain fixed however I want to dynamically calculate the left position in the left ad and the right positioning in the right ad to be able to sit 10px left or right of the body.</p>
  
  <p>With my body always being 980px and centered I figured out the math to do this based on browser width. My Ad's are 160px in width.</p>
  
  <p>Width Calc for Left AD:</p>
  
  <p>(Browser width - 980) / 2 = X</p>
  
  <p>(Browser Width - (160 + X + 980)) -10</p>
  
  <p>Width Calc for Right Ad:</p>
  
  <p>(Browser width - 980) / 2 = X</p>
  
  <p>(Browser width - X) +10</p>
  
  <p>Calculations explained:  I am subtracting the body width of 980 from the dynamic browser width  then dividing by 2 to get the value of the empty spaces between the end of my browser and the end of my body. This is where the ads with sit.</p>
  
  <p>The second calculation for each respective ad then calculates where the ad should be positioned within the browser screen.</p>
  
  <p>The right ad is simple. It's the Browser width minus X which is the empty space value form the first calculation. Then add 10px. This will set the ad 10x to the right of the body.</p>
  
  <p>The second calculation for the left ad is more complicated but also will set the left ad 10px to the left of the body.</p>
  
  <p>How do I use jquery or javascript to do these calculations and where do I run the jquery? In the css styling file or in my footer.php file where the div's are in the code?</p>
  
  <p>Also if anyone knows a quicker solution to this problem that will allow my div's to sit 10px left or right of the body. Please let me know.</p>