This commit is contained in:
Neale Pickett 2012-07-06 18:48:21 -06:00
parent 1f768928f7
commit 51f4c699a6
1 changed files with 18 additions and 2 deletions

View File

@ -24,6 +24,7 @@
body { body {
background: url(bg.jpg) #222; background: url(bg.jpg) #222;
background-size: 100% auto; background-size: 100% auto;
font-size: 160px;
color: #eee; color: #eee;
margin: 0; margin: 0;
} }
@ -38,8 +39,23 @@ body {
function resize() { function resize() {
var b = document.getElementsByTagName("body")[0]; var b = document.getElementsByTagName("body")[0];
var w = window.innerWidth; var w, h;
var h = window.innerHeight;
// Internet Explorer makes everything a pain in the ass
if (window.innerWidth) {
w = window.innerWidth;
h = window.innerHeight;
} else if (document.documentElement && document.documentElement.clientWidth) {
w = document.documentElement.clientWidth;
h = document.documentElement.clientHeight;
} else if (document.body) {
w = document.body.clientWidth;
h = document.body.clientHeight;
} else {
// Punt
w = 800;
h = 600;
}
w /= 7; w /= 7;
h /= 5; h /= 5;