diff --git a/galleryscript.js b/galleryscript.js index cd017d6..807b7e2 100644 --- a/galleryscript.js +++ b/galleryscript.js @@ -1000,6 +1000,7 @@ function showbigimage(i) { $('#imagesingle').css('width','auto'); $('#imagesingle').css('height',height); } + $('#imagesingle').css('background-image','url("_tn/tn_'+encodeURIComponent(imagelist[i])+'.jpg")'); } $('#imagecontainer').css('height',height); diff --git a/gallerystyle.css b/gallerystyle.css index 0af7350..34a3378 100644 --- a/gallerystyle.css +++ b/gallerystyle.css @@ -189,6 +189,8 @@ margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; +background-size: contain; +background-repeat: no-repeat; } #imagebig { text-align: center;