我想将两个按钮放在页面的中央。以下是我的代码。它只以中心的btnExport为中心,但不以btnReset为中心,它始终停留在左边。当我在排列级尝试右拉或左拉时,两个按钮都正确地向左或向右移动!如何将两个按钮居中放在一个页面上
<div class="row" style="padding-right: 18px; margin-left: auto; margin-right: auto">
<div style="text-align: center">
<asp:button SkinID="whiteButton" id="btnReset" runat="server" CausesValidation="false" Text="Reset" onclick="btnReset_Click"></asp:button>
<span> </span>
<asp:button SkinID="blueButton" id="btnExport" CausesValidation="false" runat="server" Text="Export"></asp:button>
<input class="hidden" type="button" name="btnPrint" id="btnPrint" onClick="printDiv('divInvoiceGrid');" value="Print">
</div>
</div>
尝试添加'显示:块'到该div样式 – techspider
可能重复[在div中水平居中div](http://stackoverflow.com/questions/114543/horizontally-center-a-div-in- a-div) –
试过了,没有帮助! – Massey