Here's a portion of my table (it's a form):
Those are just two <td>
's in a <tr>
. I'm trying to get Description up top, to the top of the table cell, rather than resting on the bottom.
How can I do that?
1 Select the text you want to center between the top and bottom margins. 2 On the Page Layout tab, click the Page Setup Dialog Box Launcher. 3 Select the Layout tab. 4 In the Vertical alignment box, click Center 5 In the Apply to box, click Selected text, and then click OK.
The HTML <td> valign Attribute is used to specify the vertical alignment of text content in a cell.
Vertical alignment determines the position of the text within a section of a document relative to the top and bottom margins, and is often used to create a cover page.
You can also define vertical alignment in a cell, similar to how it is done for horizontal alignment. In vertical alignment, information in a cell can be located at the top of the cell, middle of the cell, or bottom of the cell. The default is bottom.
td.description {vertical-align: top;}
where description
is the class name of the td
with that text in it
td.description { vertical-align: top; }
<td class="description">Description</td>
OR inline (yuk!)
<td style="vertical-align: top;">Description</td>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With