Created
November 29, 2011 03:40
-
-
Save lightyoruichi/1403304 to your computer and use it in GitHub Desktop.
facebook app width fluid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load body and before content divs | |
<body style="margin:0; padding:0; border:0"> | |
<div id="allContent" style="height:100%"> | |
<div id="output" /> | |
</div> | |
<div id="fb-root"></div> | |
// Add this before closing body | |
<script src="http://connect.facebook.net/en_US/all.js"></script> | |
<script type="text/javascript"> | |
FB.init({ | |
appId : 'APP ID', | |
}); | |
function echoSize() { | |
document.getElementById('output').innerHTML = | |
"HTML Content Width: " + window.innerWidth + | |
" Height: " + window.innerHeight; | |
console.log(window.innerWidth + ' x ' + window.innerHeight); | |
} | |
echoSize(); | |
window.onresize = echoSize; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment