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: Wed Feb 08 2006 - 14:50:37 CET

Luke Matuszewski wrote:

> My question is about returned elements (which represent html tags)

Elements do not represent HTML tags. HTML elements consist of tags (start
and end tag, where the latter or both may or may not be optional), and they
also may consist of content.

Accessing the DOM with an ECMAScript implementation returns references to
element objects which represent elements in the markup.

> - do they have some property which will indicate the actual width which
> they take ?

- getComputedStyle(objRef, pseudoElem).width
  (standards compliant: Gecko, Opera)
- objRef.offsetWidth (proprietary: Gecko, IE, Opera)
- objRef.currentStyle.width (proprietary: IE)

PointedEars
Received on Mon May 1 03:10:07 2006