• Advertisement
Sign in to follow this  

Facebook html canvas 100% viewable area

This topic is 2038 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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>

Share this post


Link to post
Share on other sites
Advertisement
Nevermind facebook has exactly what I need I just wasnt searching for the right terms lol
http://developers.facebook.com/docs/fluidcanvas/

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement