Mega Code Archive

 
Categories / JavaScript DHTML / HTML
 

Vertical align the cell content in a single cell

<html> <head> <script type="text/javascript"> function valignCell(){     var x=document.getElementById('myTable').rows[0].cells     x[0].vAlign="bottom" } </script> </head> <body> <table id="myTable" border="1" height="70%"> <tr> <td>l</td> <td>l</td> </tr> <tr> <td>l</td> <td>l</td> </tr> </table> <form> <input type="button" onclick="valignCell()" value="Vertical align cell content"> </form> </body> </html>