Are style properties held in an array?

Giganews Newsgroups
Subject: Are style properties held in an array?
Posted by:  bg3…@yahoo.com (Nairb)
Date: 22 Jul 2003

Just learning here, so maybe I'm way off, but...
I was originally under the impression that css style properties could
be accessed/ listed since they exsisted as an array somewhere.

Is this just flat out wrong?

To illustrate - I guess I thought something like this could be used to
list available/ or set properties, or in this example the first
property. Is this just a fantasy? Or how does this work, at this level
or for document objects even?

//assuming <div id="menu"></div> exisists and hs styles applied....

document.write(document.getElementById('menu').style[0]);

//of course this is wrong...

Replies