I really dont know whats wrong with that... LOL
I was trying to do that and its pretty important... Can u help me?
Would be very nice :D
Thx
<script>
var img = document.getElementById("img");
var height = img.height;
var width = img.width;
alert(height);
</script>
<div>
<img id="img" src="https://www.w3schools.com/css/trolltunga.jpg">
</div>
<style>
#img {
position: absolute;
top: 50%;
left: 50%;
width: 400px;
height: auto;
margin-left: -200px;
}
</style>