...

View Full Version : a problem with setAttribute



mamay
08-14-2004, 02:42 PM
I've created a dynamic table where rows can be added upon clicking 'add new row' button
I gave some attribues to <td> tags by 'setAttribute'

the problem is here that 'setAttribute' doesn't work for 'valign' attribute,
for example tag.setAttribute('align','right'); works correctly, but tag.setAttribute('valign','top'); does not work!

I'm using IE6
what's the reason?
thanks.

dumpfi
08-14-2004, 02:58 PM
Try:

tag.style.verticalAlign = 'top';

dumpfi

Willy Duitt
08-14-2004, 03:46 PM
I've run into this problem before myself....

Try camelCasing vAlign....

setAttribute('vAlign','top');

.....Willy

mamay
08-14-2004, 04:05 PM
greate :thumbsup:
thank you both.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum