Re: (DOM)Compute the sum of width of elements contained in blockleve element
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: (DOM)Compute the sum of width of elements contained in blockleve element

From: Thomas 'PointedEars' Lahn <PointedEars@web.de>
Date: Thu Feb 09 2006 - 02:53:24 CET

Zif wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Zif wrote:
>>> Luke Matuszewski wrote:
>>>> My question is about returned elements [...] do they have some
>>>> property which will indicate the actual width which they take ?
>>> Elements don't represent tags anymore than a building represents the
>>> plans that were used to build it. Anyhow, enough semantic crap :-)
>>>
>>> You are looking for clientHeight and clientWidth, [...]
>> He is not:
>
> Maybe, maybe not - or can you read minds?

He is definitely not, and one does not need to be able to read minds for
that, a minimum clue suffices. He asked about the actual width of the
element. As I pointed out, the client* properties do not provide that
kind of information as they do not take scrollbars, borders and margins
of the element into account. The offset* properties do, with more
consistent results among user agents and rendering modes.

> Maybe you only read to here then punched out a knee-jerk response - or
> are you deliberately ignoring the reference to the documentation and
> getComputedStyle/currentStyle methods?

Maybe not.

PointedEars
Received on Mon May 1 03:11:12 2006