Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
300 views
in Technique[技术] by (71.8m points)

html - Vertical Alignment of text in a table cell

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
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>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...