vAlign property (caption)
In other browsers you can use the captionSide style property instead.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: vAlign |
Possible values:
String that sets or retrieves the vertical position.
One of the following values:
Caption is at the bottom of the table. | |||||||
Default. Caption is at the top of the table. |
Default: top.
Example HTML code 1:
This example illustrates the use of the vAlign attribute:
|
||||
<table border="1px"> <caption id="myCaption" valign="bottom">Fruits</caption> <tr> <td>Apple</td> <td>Pear</td> <td>Peach</td> </tr> </table> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the vAlign property:
|
||||
<head> <script type="text/javascript"> function ChangeType (elem) { var caption = document.getElementById ("myCaption"); // Returns the index of the selected option var whichSelected = elem.selectedIndex; // Returns the text of the selected option var vPosition = elem.options[whichSelected].text; if ('vAlign' in caption) { caption.vAlign = vPosition; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <table border="1px"> <caption id="myCaption" valign="bottom">Fruits</caption> <tr> <td>Apple</td> <td>Pear</td> <td>Peach</td> </tr> </table> <select onchange="ChangeType (this);" size="2"> <option selected="selected" />bottom <option />top </select> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
Related pages:
External links:
User Contributed Comments