hi, i looking for function to know the size of a div,table and window/content then i want move one picture to the bottom of the table/div i already try use the align: bottom etc and that work when i load the page for the first time. but when i change the content without reloading the page the image simply don´t go to the bottom, so i looking fo a way using javascript to force the image position to the bottom- thanks for your help
For knowing the size of a div or table, document.getElementById('mydiv').offsetWidth; document.getElementById('mydiv').offsetHeight; Code (markup): For knowing the size of the window, function returnWindowSize() { var myHeight = 0; var myWidth = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myHeight = window.innerHeight; myWidth = window.innerWidth; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; myWidth = document.documentElement.clientWidth; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; myWidth = document.body.clientWidth; } return myHeight +":"+ myWidth; } Code (markup): Hope this helps.