This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Sorry Bear, it's possible. OffsetWidth is originally a window attribute in MS JScript, but it can be used in common DOM Browsers for other objects:
Tested in IE and Phoenix ( now Firebird, Mozilla ) Edit: Just found out, that it even returns a pixel-value when you define a percentage width in the style attribute [ June 08, 2003: Message edited by: Chris Baron ]
Interesting. I got some weird behavior for this attribute under Mozilla on Windows (but not on the Mac), but otherwise it seems to work on most of the major browsers. It's not part of the W3C DOM spec, so you might want to be careful using it if you need broad browser support. Here's more info. So, I'll amend my answer to: there's no standards-compliant way to do it that works on all W3C-compliant browsers. But if it works in a subset of browsers that you are interested in, go for it. hth, bear