我最近编码导航下拉菜单。
我在每个地方都加上style="vertical-align: middle;"
。
图像和文字仍然不会垂直对齐中间。
我需要的表格仍然存在,所以我可以添加更多td
s。
我完成了尝试,有人会帮助我吗?造型 - 垂直对齐图像和td标签内的标签内的文本
<style>
a:hover {
background-color: rgba(203, 227, 255, 0.625) !important;
}
</style>
<table align="center" class="exc">
<tr>
<td class="null" style="white-space:nowrap; vertial-align: middle; overflow:hidden; border-radius: 50px; border: 2px solid #87ceeb !important; background-color: rgba(224, 255, 255, 0.625);">
<a href="https://example.com" style="display:inline-block; text-decoration: none; color: #6699cc;">
<font size="6"> 
<img src="http://icons.iconarchive.com/icons/graphicloads/100-flat/128/home-icon.png" width="48px" style="vertial-align: middle; width=100%; height:100%;" />
 HOME   </font>
</a>
</td>
<td class="null" style="white-space:nowrap; vertial-align: middle; overflow:hidden; border-radius: 50px; border: 2px solid #87ceeb !important; background-color: rgba(224, 255, 255, 0.625);">
<a href="https://example.com" style="display:inline-block; width=100%; height:100%; text-decoration: none; color: #6699cc;">
<font size="6">   HOME   </font>
</a>
</td>
</tr>
</table>
感谢您的慷慨帮助,并在短时间内做出回应! – Louis55
@ ll55我的荣幸! –