Site measures related to javascript
<p>I´m making a website.
In this site, there´s a div that needs to have its with and height set based on the user window width and height.</p>

<p>How could be the formula?</p>

<p>These are the measure relations:</p>

<p>If window width is 1920 div width needs to have 180.
If window height is 1080 div height needs to have 98.</p>

<p>I was using a function that gets the user window measures... like this:</p>

<pre><code>div.style.width = 180*getWindowWidthAndHeight().width/1920
div.style.height = 98*getWindowWidthAndHeight().height/1080
</code></pre>

<p>The problem is in the div´s height final measure result I´m getting the rigth measure minus one.</p>

<p>That is because my window height (based on the user window) is getting the right measure minus one. (Maybe because of my browser, it may have a bar on it that makes the function 'getWindowWidthAndHeight' return the window height minus that bar).</p>

<p>Does anyone know how could be the right formula to set the div width and height properties?</p>

<p>Thanks :)</p>
