[thelist] DOM & CSS

.jeff jeff at members.evolt.org
Wed Mar 13 20:10:08 CST 2002


> From: Burhan Khalid
> The first line (document.) works as expected, but the
> second line does not give any results. I'm trying to
> change only the bottom border's values (and eventually
> only the top, left and right borders). The problem is,
> each of these borders needs to be different, and I don't
> know of a way of doing it a la document.getEle.....
> style.border-left?

to access hyphenated css properties via script, simply drop the hyphen and upper case the letter immediately proceeding it.  so, you end up with the following:

border-width = borderWidth
margin-top = marginTop
padding-top = paddingTop
background-color = backgroundColor

good luck,


jeff at members.evolt.org

More information about the thelist mailing list