出于某种原因,我的 td 元素 (id='future_order') 没有居中对齐。我在网上做了很多研究,但没有找到任何有用的东西。
任何帮助将不胜感激!谢谢!
CSS 代码
#order_info_container{
width: 600px;
height:100%;
margin-left: auto;
margin-right: auto;
margin-bottom: 40px;
}
#order_time, #future_order{
vertical-align: middle;
text-align: center;
font-size: 28px;
font-weight: bold;
padding-top: 30px;
}
HTML 代码
<table id="order_info_container">
<tbody>
<tr>
<td>
<img id="o_summary_logo" src="o_summary_logo,png">
</td>
<td id="customer_service">
<b>
Customer Service # (212)-283-5751
<br>
Thank you for Business!
</b>
</td>
</tr>
<tr>
<td id="future_order">****FUTURE ORDER****</td> <!-- This is not aligning in the middle -->
</tr>
</tbody>
</table>
最佳答案
改变:
<td id="future_order">****FUTURE ORDER****</td>
到:
<td id="future_order" colspan="2">****FUTURE ORDER****</td>
关于html - 需要帮助将我的 td 元素居中对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24494418/