Newbie Q, clientHeight and offsetHeight

C

codefragment

Hi
I beleive that offsetHeight is clientHeight plus border plus
scrollbars. So why here
where there is no border or scrollbars is clientHeight 0 and
offsetHeight: 19.
ta


<body onload=func()>
<form>

<span id=theSpan>hi</span>

<script>
function func()
{
alert(theSpan.clientHeight);
alert(theSpan.offsetHeight);
}

</script>

</form>
</body>
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top