[英]Align buttons in the td element to right
具有以下html結構。 我想在右對齊的 td 元素中顯示按鈕。 試過 float:right 在 css 中。 但沒有變化。 請讓我知道我在哪里犯了錯誤。 提前致謝
<div id="saveResetDiv" class ="saveReset" style="display: none;">
<table id ="tableSaveReset">
<tbody>
<tr id ="buttonSaveReset" class= "buttonSaveReset">
<td class= "save" align= "right" ><button id="saveButton" class="save" bgcolor="#FF0000" >Save</button></td>
<td class= "reset" align= "right"><button id="resetButton" bgcolor="#FF0000">Reset</button></td>
</tbody>
</table>
</div>
在 CSS 中使用float: right
屬性
首先給表格一些寬度。
然后你可以使用,
浮動:右(或)對齊:右
您只能將 2 個按鈕左對齊或右對齊
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.