2017-09-18 44 views
1

我有一個帶有多列的HTML <article>。第一列總是比其他列低1/2至1行。我試圖擺脫標題,其他一切嘗試隔離它,但我顯然錯過了一些東西。在HTML文檔中參差不齊的列表

<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

好的,所以沒有工作。看起來像我必須學習如何發佈,以便您可以看到我的HTML和CSS。 – sunspore

回答

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>

+0

非常感謝!像魅力一樣工作。 – sunspore

+0

您應該點擊答案左邊的複選標記以標記它已解決 – abney317

0

0保證金添加到您的段落元素。

p { margin: 0}