|
-
Dec 9th, 2002, 02:21 PM
#1
Thread Starter
Addicted Member
Dynamically Change the valign of a <td>
Hey all,
I am tring to dynamically change the vertical alignment of a <td> but am running into trouble:
<TD id="link5" name="link5" BGCOLOR="#000259">
<select name="valignleft" size="1" OnChange="window.document.all['link5'].valign='bottom' ">
<option value="top">Top</option>
<option value="middle">Middle</option>
<option value="Bottom">Bottom</option>
</select>
I can get this to work with background color and other things, but not with valign. I've tried verticalalign, and textalign to no avail! Any help would be appreciated.
Thanks
Bebandit
-
Dec 9th, 2002, 03:54 PM
#2
Frenzied Member
I would use style instead. This will work cross-browser too by the way (document.all is IE only I think):
Code:
<table><tr>
<td style="vertical-align:bottom;" id="c1" onclick="document.getElementById('c1').style.verticalAlign = 'top';">asdasdasda</td>
<td valign="top">asdasdasda<br>asdasdasdasdasda<br>asdasdasdasdasda<br>asdasd</td>
</tr></table>
-
Dec 10th, 2002, 04:16 PM
#3
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|