I want to align 3 elements in my <td>
tag vertically in the center/middle. These are the elements that I want to align:
- image button (a tag) top arrow image
- jquery slider
- image button (a tag) bottom arrow image
Essentially the elements are there for vertically scrolling of a chart. They are a bit misaligned. I want them all to be in center.
My current code is:
<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>
I am open to removing div tag related to image buttons, but td tag should stay there.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…