Firstly, I’m by no means a web designer so I have very little idea what I’m doing.
I’m working on the HTML/Javascript for a Unity Webplayer application trying to make the Webplayer take up most (not all) of the browser’s viewable area. The <body> of the page is set to have no margins nor scroll bars like so,
<body margin="0" marginwidth="0" marginheight="0" scroll="no">
I’m getting the values for the browser’s viewable area like this,
winWidth = window.innerWidth;
winHeight = window.innerHeight;
And I call the Unity Webplayer with this,
unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", winWidth, winHeight, params);
Everything seems to work mostly properly with this setup. However, when I multiply winWidth and winHeight by non-whole numbers (i.e., 0.5 or 1.9) the height is not properly scaled in Firefox 12. Regardless of the value I put in there, it’s always the same (wrong) vertical height. In this picture, both innerHeight and innerWidth are multiplied by 0.9 and, as you can see, height is definitely wrong—and this is the wrong height I get no matter what non-whole number I multiply it by.

This code works just fine in Chrome 19 and IE 9. How do I fix this?
I don’t know what the exact situation is, as I’m not familiar with the Unity JavaScript interface you are using, but I think there’s a good chance that you need to specify an integer width and height for the player, whereas your calculation is producing a non-integral number.
Simply write
Math.round(winWidth * 0.9)instead ofwinWidth * 0.9to get the nearest integer result.