Page 1 of 1

how know the size of a div,table and window?

Posted: Wed Jul 22, 2009 4:07 pm
by srdva59
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
:)

Re: how know the size of a div,table and window?

Posted: Thu Jul 23, 2009 6:31 am
by JAB Creations
You can manually change the styling...

Code: Select all

document.getElementById('test').style.width='100px';document.getElementById('test').style.width='100%';document.getElementById('test').style.backgroundColor='#faa';
Though you'll much better off changing the class...

Code: Select all

document.getElementById('test').className='my_class';