hi, at the moment i'm trying to get the height width of the background image.
but i always get the width/height of the full size of the div or the window size. for example if the image is not big enough for the browser window the image is more than one time in the screen and i need the width/height of ONE image and not of the div which is around or so. so far what i have tried: //1. ------ returns the full size of the div around var obj = document.getElementById('bg'); alert('background-image= '+getComputedStyle(obj,'').getPropertyValue ('background-image')); alert('width= '+getComputedStyle(obj,'').getPropertyValue('width')); alert('height= '+getComputedStyle(obj,'').getPropertyValue ('height')); //2. ------ height / width isn't correct either image_1 = new Image() image_1.src = url; DetectImageSize(image_1); function DetectImageSize(picName,picTitle){ picURL=picName.src var picwidth = picName.width; var picheight = picName.height; } //3. ------- not correct either $("body").append('<img id="foto" class="bildmasse" src="'+url+'" />'); alert($("#foto").height()+" "+$("#foto").width()); // returns 18 0 any help would be nice.