Vertical align the cell content in a table row : Table : HTML JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » HTML » Table »

 

Vertical align the cell content in a table row




<html>
<head>
<script type="text/javascript">
function valignRow(){
    var x=document.getElementById('myTable').rows
    x[0].vAlign="top"
}
</script>
</head>

<body>
<table width="50%" id="myTable" border="1">
<tr>
<td height="50">1</td>
<td height="50">2</td>
</tr>
<tr>
<td height="50">1</td>
<td height="50">2</td>
</tr>
<tr>
<td height="50">1</td>
<td height="50">2</td>
</tr>
</table>
<form>
<input type="button" onclick="valignRow()" value="Vertical align row">
</form>
</body>

</html>



           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo HTML
» Table