JavaScript Reference/Javascript Properties/vAlign table

Материал из Web эксперт
Перейти к: навигация, поиск

"vAlign" Example

   <source lang="javascript">
   

<html> <body>

Cell 1. Aligned top. Cell 2. Aligned top. <img src="http://www.wbex.ru/style/logo.png" width="90" height="90">
Cell 4. Aligned bottom. Cell 5. Aligned bottom. <img src="http://www.wbex.ru/style/logo.png" width="96" height="96">

<script language="JavaScript">

   document.getElementById("tr1").vAlign = "top";
   document.getElementById("tr2").vAlign = "bottom";

</script> </body> </html>


     </source>
   
  


"vAlign" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<col> <colgroup> | | |<tbody> <td> | | |<tfoot> <th> | | |<thead> <tr> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"vAlign" Possible Values

   <source lang="javascript">

Possible Values middle the default baseline bottom top


     </source>
   
  


"vAlign" Syntax and Note

   <source lang="javascript">

Note: Read and write property. How the element"s content is vertically aligned.

Syntax:

document.getElementById("elementID").vAlign = value document.all.elementID.vAlign = value // IE only


     </source>