Html 将图像与表格底部对齐
当前正在尝试将图像与其表格底部对齐。目前,它自然恢复到顶部。我已经尝试了所有的方法,但是图像仍然放在桌子的顶部Html 将图像与表格底部对齐,html,css,html-table,Html,Css,Html Table,当前正在尝试将图像与其表格底部对齐。目前,它自然恢复到顶部。我已经尝试了所有的方法,但是图像仍然放在桌子的顶部 </table> <td class="logo-label"> <table> <img src="http://strawberry.wpdevcloud.com/wp-content/uploads/2018/06/smllnat_logo.jpg" height="36" width="113">
</table>
<td class="logo-label">
<table>
<img src="http://strawberry.wpdevcloud.com/wp-content/uploads/2018/06/smllnat_logo.jpg" height="36" width="113">
</td>
</table>
我知道这将是一件简单的事情,但目前我无法理解为什么图像没有移动 首先,你真是一团糟。其次,您需要查看CSS文件并查看“徽标标签”正在做什么。即控制图像的对齐
<table>
<tr>
<td class="logo-label">
<img src="http://strawberry.wpdevcloud.com/wp-content/uploads/2018/06/smllnat_logo.jpg" alt="Natural Complexions" height="36" width="113">
</td>
</tr>
</table>
首先,HTML结构完全错误
和
是表格单元格,因此它们位于
和
之间(表格行)<代码>和
位于
和
之间(表格本身)。表的结构如下所示:
<table>
<tr>
<td>Cell contents here</td>
</tr>
</table>
目前“商标标签”只是设置宽度而已。我想我需要添加类似img{display:block;margin:auto;}.top{vertical align:top;}.bottom{vertical align:bottom;}img{display:block;vertical align:bottom;margin left:auto;margin right:auto;}