這看起來很簡單,但我似乎因爲某些原因而失敗。所以我有3張圖片,每張圖片上方都有鏈接。我希望它們以內聯方式出現,並且我不能使用表格,所以我嘗試使用div,但它們一個接一個出現,而不是內聯。注意:我的網頁寬度爲1000像素我怎樣才能讓這些鏈接和圖像以內嵌方式出現
<!-- First Div with link and image-->
<div style="float:left;width:33%">
<a href="/bartop">BarTop Epoxy</a>
<img style="margin: 15px;"src="image1" width="300" height="315">
</div>
<!-- Second Div with link and image-->
<div style="float:left;width:33%">
<a href="/counter top"> Countertop</a>
<img style="margin: 15px;" src="image2" width="300" height="315">
</div>
<!--third Div with link and image-->
<div style="float:left;width:33%">
<a href="/flooring">Flooring</a>
<img style="margin: 15px;" src="image3" width="300" height="315">
</div>
請指定您正在使用哪個瀏覽器,上面的代碼應該工作。或者添加容器div和相關的css – Huangism
@Plume最後一項不需要它 – Huangism
我使用的是鉻,但清除沒有作品,或者我沒有考慮圖像兩側的15px – user3204342