我具有竖直对准的两个图标与文本元素的问题。我不确定为什么文本div在容器上方创建了额外的空间。如何将两个文本行与两个复选框图标垂直对齐?垂直居中对齐文本
- 我刚刚意识到p标签上方的空间是由图像生成的。当我将图像的位置设置为绝对时,文本和图像对齐。
下面是该网站的链接:http://fosterinnovationculture.com/email/index.html
这里是HTML:
<th style="text-align:center">
<div class="bullet-container">
<div class="bullet-one">
<div class="img-left" style="width:60px; margin:0; display:inline-block; text-align:right;">
<img src="images/icons/check_box.png" style="width:30px; display:inline-block; margin-right:0px">
</div>
<div class="content-right" style="display:inline-block">
<p>Remove all work, supplies, and trash</p>
</div>
</div>
</div>
</th>
试着让你的图片'垂直对齐:middle' – Loktar
上帝,我甚至不知道垂直对齐中存在。谢谢! – marcos
@marcos vertical-align独自不会处理这个。检查我的答案我在浏览器中测试它,它的工作原理!只需将我的css粘贴到您的css文件中,然后用我的答案中的html代替html。 – wuno