diff --git a/public_html/js/Views.js b/public_html/js/Views.js
index e40c0be..24e7f9e 100644
--- a/public_html/js/Views.js
+++ b/public_html/js/Views.js
@@ -152,7 +152,7 @@ Views.prototype.sprite = function (whoid, params, position, alias, effect) {
} else {
//if (this.useSpriteTransitions) img = new AnimatableImageView(this);
//else img = new ImageView(this);
- img = $('', {class: "sprite", style: "height: " + window.innerHeight + "px;" });
+ img = $('', {class: "sprite", style: "height: " + $('#background').outerHeight(true) + "px;" });
this.spriteInContainer[key] = img;
}
var path = PathResolver.sprite(whoid, params);
@@ -205,7 +205,7 @@ Views.prototype.hide = function (whoid, effect) {
};
Views.prototype.setSpritePosition = function (img, position) {
- var width = window.innerWidth;
+ var width = $('#background').outerWidth(true);
var imgWidth = img.width();
if (TextUtils.isEmpty(position) || position.equals("center")) {
img.css("left", Math.floor(width / 2 - imgWidth / 2) + "px");