如何移动按钮以与右侧的按钮对齐,如下所示:
html如下:
<table>
<tr>
<td>
<h4> Search: </h4>
</td>
<td>
<input type="text" />
</td>
<td>
<button type="submit" name="abc" form="submitForm" value="Button">Button</button>
</td>
</tr>
<tr>
<td class="customView">
<button type="submit" name="def" form="submitForm" value="Button">Button</button>
</td>
</tr>
</table>
答案 0 :(得分:1)
将colspan="3"
,align="right"
添加到您的<td>
代码中,工作正常,我已添加以下代码段。
<table>
<tr>
<td><h4> Search: </h4></td>
<td><input type="text"/> </td>
<td><button type="submit" name="abc" form="submitForm" value="Button">Button</button></td>
</tr>
<tr >
<td class="customView" colspan="3" align="right"><button type="submit" name="def" form="submitForm" value="Button">Button</button></td>
</tr>
</table>
&#13;
答案 1 :(得分:1)
<table>
<tr>
<td>
<h4> Search: </h4>
</td>
<td>
<input type="text" />
</td>
<td>
<button type="submit" name="abc" form="submitForm" value="Button">Button</button>
</td>
</tr>
<tr>
<td colspan="2"></td>
<td class="customView">
<button type="submit" name="def" form="submitForm" value="Button">Button</button>
</td>
</tr>
</table>