HTML垂直居中按钮对齐

问题描述:

如何对齐2个文本框右侧的按钮,但是垂直居中? (我打算为Windows 8地铁的感觉。)HTML垂直居中按钮对齐

我有什么:

enter image description here

我想要什么(样机):

enter image description here

+0

Windows 8 style =带纯色的按钮无边框。 –

+0

为什么不直接给它一个保证金? –

+0

这似乎不起作用,因为它不在它自己的专栏中。 – Flaxbeard

可以使用表格标签如下

<table> 
    <tr> 
     <td> 
     <input type="text" name="textbox1"> 
     <br> 
     <input type="text" name="textbox2"> 
     </td> 
     <td> 
     <button name="abc" value="Submit" type="button">Submit</button> 
     </td> 
    <tr> 
    </table> 

希望它帮助

+1

切勿使用表格来对齐页面上的元素。表格是表格数据。 –

+0

这是最简单的方法。我认为:) –

+0

可能会使用这种方法,但想知道如果这样使用表是“禁忌”吗? – Flaxbeard