Actual Div Size

A

Alexander

Actual Div Size
===============

How can I determin the actaul size of a Div?

The style properties of a Div determin the minimum size of the Div Box.
But the Size can be larger depending on the content of the Div.

How can I determin the actual size (real size) of a Div Box?

Thanks
Alexander
 
V

Vjekoslav Begovic

Alexander said:
How can I determin the actaul size of a Div?

document.getElementById("myDiv").offestHeight
document.getElementById("myDiv").offestWidth
 
T

Thomas 'PointedEars' Lahn

Vjekoslav said:
^^^^^^
document.getElementById("myDiv").offestWidth
^^^^^^
Typo.

offsetHeight
offsetWidth

These are proprietary properties, do not expect them
to be supported, so check them before accessing them.

if (...offsetHeight)
{
...
}


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top