[thelist] DHTML in Opera

James Aylard webmaster at equilon-mrc.com
Fri Jul 20 12:45:13 CDT 2001


George,

> Does Opera not support changing of border properties?  I have a div with a
> border and I'm trying to click on the div and change the border color.
Any
> ideas?
> here's the line I'm using:
> document.getElementById('menuoption1').style.border-color = 'blue';

    I presume Opera does, but you have a syntax error that should prevent
this from working in *any* browser. All hyphenated CSS properties (e.g.,
border-color), when used within script, are transformed so that all hyphens
are removed, and all words previously preceded by a hyphen are capitalized.
So, border-color becomes borderColor.

hth,
James Aylard





More information about the thelist mailing list