Click to See Complete Forum and Search --> : changing border colours


azz
07-10-2003, 11:39 AM
hey all,

Just wondering how i can chane the border colours on a table cell in a function called by a mouseover. Y'know you can use the

document.style.backgroundColor = 'white'

thing?

does anybody know of something like:

document.style.topBorderColor = 'blue'
document.style.leftBorderColor = 'blue'

or something ... know what I mean?

Cheers

azz.

xataku_nakusute
07-10-2003, 06:18 PM
here you are:

<HEAD>
<STYLE>
TD { border-color: normalcolor }
.someclassname { border-color: onmouseovercolor }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='someclassname(from your head sec)'"
onmouseout="this.className=''">
..Your text..
</TD>
</TR>
</TABLE>

good luck!

)(aTaKu_(\)aKuSuTe

XaTaKu.TK (http://www.xataku.tk/)

Jona
07-10-2003, 07:22 PM
Here's what you do. Always remember that if there is a dash in the normal style (e.g., border-right-color:red), use the same exact words but take out the dash (-) and capitalize the next letter:


borderLeftColor = 'red';
borderTopColor = 'blue';


[J]ona

azz
07-11-2003, 02:48 AM
WICKED!!

TOP tip, dude! Thanks for that! gonna come in V V V useful!!

nice 1


Azz.

Jona
07-11-2003, 12:25 PM
lol. You're welcome. :D

[J]ona