Facebook html canvas 100% viewable area

Started by
2 comments, last by jbadams 11 years, 9 months ago
I am trying to get my html5 game on facebook and trying to find a way for it to fill the entire viewable screen but sometimes the ads make the page longer and it goes past the viewport.

I can get it working locally but wont work view facebooks iframe
If you try this it fills the screen and still allows for you to scroll how can I do the same in the iframe?

<html>
<head>
<style>
* {margin:0;padding:0}
</style>
</head>
<body>
<div style="width:100%;height:100%;background-color:#000"></div>
<br>
Bottom
</body>
</html>
Advertisement
Nevermind facebook has exactly what I need I just wasnt searching for the right terms lol
http://developers.facebook.com/docs/fluidcanvas/
Well the facebook code they give works for the viewport but then when I go to fill up the bottom area to have content where the ads are the iframe is only the viewport size so I end up getting a scroll bar instead of filling in the whitespace.

I was thinking if I can get the size of the entire viewport with javascript I could just resize everything minus the top and right bars but I cannot seem to get the parent window? Is there a way to figure out the whole screen width?
Wait... do you mean that you're trying to cover up or replace the ads? That isn't supported, for what I think are pretty obvious reasons...

- Jason Astle-Adams

This topic is closed to new replies.

Advertisement