[英]Vertical Alignment (HTML)
Can someone please help me vertically middle align the first two columns of my table. 有人可以帮我垂直对齐表格的前两列。 Please see the code below:
请参见下面的代码:
<table border="1" style="width: 625px;">
<tbody>
<tr>
<td colspan="3" rowspan="1"><b>Property 1</b></td>
</tr>
<tr>
<td colspan="1" rowspan="1">Yellow</td>
<td colspan="1" rowspan="1">Ad</td>
<td colspan="1" rowspan="1">abcdefgfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
<ul>
<li>12345</li>
<li>4556</li>
<li>793</li>
</ul>
</td>
</tr>
</tbody>
It appear like this currently: 当前看起来像这样:
try adding this css: 尝试添加此CSS:
table tr td:nth-child(1),td:nth-child(2){
text-align: center;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.