Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在html中向右移动按钮_Html_Css - Fatal编程技术网

如何在html中向右移动按钮

如何在html中向右移动按钮,html,css,Html,Css,在我的网站上,我创建了一个用于插入用户详细信息的弹出窗口。在这个表单中,我使用两个按钮,一个用于保存,另一个用于取消弹出。我想把两个按钮都移到页面的右边。 两个按钮都放置在单独的tr和td中 我使用了style=“width:100px;float:right;” 但没有变化 我的模式弹出代码 <cc1:ModalPopupExtender ID="myModalprofilepopup" ClientIDMode="Static" runat=&q

在我的网站上,我创建了一个用于插入用户详细信息的弹出窗口。在这个表单中,我使用两个按钮,一个用于保存,另一个用于取消弹出。我想把两个按钮都移到页面的右边。 两个按钮都放置在单独的
tr
td

我使用了
style=“width:100px;float:right;”

但没有变化

我的模式弹出代码

<cc1:ModalPopupExtender ID="myModalprofilepopup" ClientIDMode="Static" runat="server" PopupControlID="Panl1" TargetControlID="Button1"
        CancelControlID="btnclose" BackgroundCssClass="Background">
    </cc1:ModalPopupExtender>
    <asp:Panel ID="Panl1" runat="server" CssClass="Popup" align="center" Style="display: none">
        <div class="pull-right">
            <%--<asp:ImageButton ID="Button2" Height="20px" Width="20px" runat="server" AlternateText="Close" ImageUrl="~/Images/Cancele_ButoonPNG.PNG" />--%>
        </div>
        <%--<div class="registrationFormAlert" style="color:green;" id="CheckPasswordMatch"></div>--%>
        <b style="font-size: 25px">FAV-VS Add New User</b><br />
        <br />
        <table id="NewAddItems">
            <tr id="trAddNew">
                <td>
                    <table border="0" class="width100p">
                        <tr>
                            <td>
                                <table class="width100p">
                                    <tr>
                                        <td><b>User ID</b><span class="requierdField"><b>*</b>&nbsp;</span></td>
                                        <td>
                                            <input type="text" autocomplete="off" onkeypress="return isNumberKey(event)" class="width50p input-tb" style="width: 200px" id="txtUserIDAU" placeholder="Please Enter User ID" maxlength="15" />
                                        </td>
                                        <td><b>User Name</b><span class="requierdField"><b>*</b>&nbsp;</span></td>
                                        <td>
                                            <input type="text" autocomplete="off" class="width50p input-tb" style="width: 200px" id="txtUserNameAU" placeholder="Please Enter User Name" maxlength="150" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><b>Password</b><span class="requierdField"><b>*</b>&nbsp;</span></td>
                                        <td>
                                            <input type="password" autocomplete="off" class="width50p input-tb" style="width: 200px" id="txtPasswordAU" required="required" maxlength="30" />
                                        </td>
                                        <td><b>Confirm Password</b><span class="requierdField"><b>*</b>&nbsp;</span></td>
                                        <td>
                                            <input type="password" autocomplete="off" class="width50p input-tb" style="width: 200px" id="txtConfimPasswordAU" maxlength="150" />
                                        </td>
                                        <td>
                                            <span id="CheckPasswordMatch" style="color: red;"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>&nbsp;<b>Status</b><span class="requierdField"><b>*</b>&nbsp;</span></td>
                                        <td>
                                            <input type="radio" name="Status" checked="checked" value="Active" /><label for="first"><b>&nbsp;Active</b></label>&nbsp;&nbsp;
                                            <input type="radio" name="Status" value="Inactive" /><label for="first"><b>&nbsp;In Active</b></label>
                                        </td>
                                        <td>&nbsp;<b>Plant</b><span class="requierdField">*&nbsp;</span>
                                        </td>
                                        <td>
                                        </td>
                                      </tr>
                                   </table>
                                </td>
                             </tr>
                              <tr>
                                <td style="width: 100px; float:right;">
                                 <asp:Button ID="btnSave" runat="server" ClientIDMode="Static" OnClientClick="return validatepopup();" Text="Save" CssClass="btn-success" />
                                 <asp:Button ID="btnclose" runat="server" Text="Close" CssClass="btn-danger" />
                                </td>
                              </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </asp:Panel>
<tr>
  <td style="width: 100px; float:right;">
      <asp:Button ID="btnSave" runat="server" ClientIDMode="Static" OnClientClick="return validatepopup();" Text="Save" CssClass="btn-success" />
      <asp:Button ID="btnclose" runat="server" Text="Close" CssClass="btn-danger" />
  </td>
</tr>


设置这两个按钮中最接近的父按钮的宽度,使其具有

宽度:100%;显示器:flex;证明内容:柔性端

您是否将
设置为宽度:100%

当宽度设置为100%时,这在我的系统上运行良好

<table style="width: 100%;">
<tr>
<td style="width: 100px; float:right;">
<button>Button 1<button>
<button>Button 2</button>
</td>
</tr><
/table>

按钮1
按钮2
<
/表>

可能
应该是
这与asp无关。请单击编辑,然后单击
[]
代码段编辑器并进行编辑asp@llyaBursov Thanx现在可以工作了,谢谢你,所以muchI在td上应用了相同的功能,但我没有发现任何变化