'vertical-align' Example : vertical align : CSS Attributes and Javascript Style Properties HTML CSS TUTORIALS


HTML CSS TUTORIALS » CSS Attributes and Javascript Style Properties » vertical align »

 

'vertical-align' Example



    
<html>
<body>
<table width="70%" border="1" cellspacing="5" cellpadding="5">
   <tr height="50">
      <td>Cell content</td>
      <td>Cell content</td>
   </tr>
   <tr height="100" id="myT">
       <td><img src="http://www.navioo.com/style/logo.png">Cell text content</td>
       <td>Cell text content</td>
   </tr>
</table>
<br>
<input type="button" 
       onclick="myT.style.verticalAlign='text-top'" 
       value="Set verticalAlign to text-top">
<input type="button" 
       onclick="myT.style.verticalAlign='text-bottom'" 
       value="Set verticalAlign to text-bottom">
<input type="button" 
       onclick="myT.style.verticalAlign='top'" 
       value="Set verticalAlign to top">
<input type="button" 
       onclick="myT.style.verticalAlign='bottom'" 
       value="Set verticalAlign to bottom">
<input type="button" 
       onclick="myT.style.verticalAlign='auto'" 
       value="Restore position">
</body>
</html>

    
      
      



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo CSS Attributes and Javascript Style Properties
» vertical align