From bb7bc46d5dc1c0eeb44e60e4dd3dee588664478e Mon Sep 17 00:00:00 2001 From: neingeist Date: Mon, 25 Nov 2013 11:49:25 +0100 Subject: [PATCH] try to do the right thing to center the invite --- index.html | 3 ++- platformer.js | 9 --------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 474c786..cfe6a9c 100644 --- a/index.html +++ b/index.html @@ -22,9 +22,10 @@ #einladung { font-family: 'silkscreennormal'; position: absolute; + top: 5%; width: 70%; - height: 50%; padding: 5%; + margin: 5%; text-align: left; z-index: 100; background: rgba(0, 0, 0, 0.8); diff --git a/platformer.js b/platformer.js index a47d71a..b157e91 100644 --- a/platformer.js +++ b/platformer.js @@ -1,14 +1,6 @@ // heavily based on the Quintus platformer example. // vim:tw=120: -// jQuery center() function. it centers things. -jQuery.fn.center = function () { - this.css("position", "absolute"); - this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) + $(window).scrollTop()) + "px"); - this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) + $(window).scrollLeft()) + "px"); - return this; -} - window.addEventListener("load",function() { // Set up an instance of the Quintus engine and include @@ -57,7 +49,6 @@ Q.Sprite.extend("Player",{ rocket.animate({ x: 100, y: -500, angle: 360 }); this.destroy(); - $("#einladung").center(); $("#einladung").show("slow"); } });