我有一个包含多列的HTML <article>
。第一列总是比其他列低1/2到1行。我试图摆脱标题,以及其他一切试图隔离它,但我显然错过了一些东西。
<article id="Safety" style="padding-bottom: 40px;padding-top: 20px;padding-right:30px; padding-left: 50px;">
<h3>Safety First: Prescription Safety Glasses</h3>
<div style="column-count: 2; column-gap: 40px; padding-bottom: 20px; padding-right: 80px; ">
<a href="https://my-benefits.ehr.com/US2/EN/myHealth/Vision/Pages/default.aspx" target="_blank"><img src="glasses.jpg" style="max-width: 100%; display: block; float: right; padding-left: 40px;"></a>
<p>Some of my fellow eyeglass wearers may not be aware that Comcast will pay for you to have your prescription safety glasses fully covered! I recently became aware of this information and wanted to share it with all of you. Per our ComcastNow website,
in the Vision Benefits SPD: Davis Vision will cover 100% of the cost, VSP- Safety Vision Glasses (Employee only) Coverage 100% after $20 copay; $75 Frame allowance. This helps us all, with the struggle of trying to wear two sets of glasses in order
to see and be OSHA compliant while working in the field. More information can be found at <a href="https://my-benefits.ehr.com/US2/EN/myHealth/Vision/Pages/default.aspx">https://my-benefits.ehr.com/US2/EN/myHealth/Vision/Pages/default.aspx</a> regarding
this great benefit. </p>
</div>
<a href="#contents" class="links">Back to Table of Contents</a>
</article>
答案 0 :(得分:1)
您可以删除段落标记或向其添加margin-top:0
<article id="Safety" style="padding-bottom: 40px;padding-top: 20px;padding-right:30px; padding-left: 50px;">
<h3>Safety First: Prescription Safety Glasses</h3>
<div style="column-count: 2; column-gap: 40px; padding-bottom: 20px; padding-right: 80px; ">
<a href="https://my-benefits.ehr.com/US2/EN/myHealth/Vision/Pages/default.aspx" target="_blank"><img src="glasses.jpg" style="max-width: 100%; display: block; float: right; padding-left: 40px;"></a>
<p style="margin-top:0">Some of my fellow eyeglass wearers may not be aware that Comcast will pay for you to have your prescription safety glasses fully covered! I recently became aware of this information and wanted to share it with all of you. Per our ComcastNow website,
in the Vision Benefits SPD: Davis Vision will cover 100% of the cost, VSP- Safety Vision Glasses (Employee only) Coverage 100% after $20 copay; $75 Frame allowance. This helps us all, with the struggle of trying to wear two sets of glasses in order
to see and be OSHA compliant while working in the field. More information can be found at <a href="https://my-benefits.ehr.com/US2/EN/myHealth/Vision/Pages/default.aspx">https://my-benefits.ehr.com/US2/EN/myHealth/Vision/Pages/default.aspx</a> regarding
this great benefit. </p>
</div>
<a href="#contents" class="links">Back to Table of Contents</a>
</article>
&#13;
答案 1 :(得分:0)
为段落元素添加0的边距。
p { margin: 0}