我想在我的<td>
標籤中垂直對齊中心/中間的3個元素。這些是我要對齊的元素:如何垂直對齊td標籤中的元素
- 圖像按鈕(標籤)頂部箭頭圖像
- jquery的滑塊
- 圖像按鈕(標籤)底部箭頭圖像
本質上元素用於垂直滾動圖表。他們有點錯位。我希望他們都處於中心位置。
我當前的代碼是:
<td style="vertical-align:top;">
<div id="div1" style="display:inline-block; horizontal-align:center; margin-top:5px;">
<a id="a_top" title="Top" class="ui-icon ui-icon-circle-triangle-n" style="border:0px;"></a>
</div>
<div id="slider_y" style="height:240px; width:6px; horizontal-align:center; margin-top:10px; "></div>
<div id="div2" style="display:inline-block;horizontal-align:center;margin-top:10px;">
<a id="a_bottom" title="Bottom" class="ui-icon ui-icon-circle-triangle-s" style="border:0px;"></a>
</div>
</td>
我打開刪除相關圖像按鈕div標籤,但td標籤應該呆在那裏。
沒有'水平align' CSS屬性。 – alex 2011-05-31 04:34:53
CSS的兩個對齊屬性是'文本對齊'(水平)和'垂直對齊'(垂直) – wired00 2011-05-31 04:43:16
將是有用的,如果你可以張貼你想要的圖片 – JohnP 2011-05-31 05:03:11