简体   繁体   中英

Display buttons side by side instead of stacked

I want to display the buttons inside my modalpopupextender side by side instead of stacked on top of each other. Below is the image:

在此处输入图像描述

I want the remove and cancel button side by side. Below is my code:

     <div >
                                    <p style="width:200px;height:100px;margin-right:auto;margin-left:auto">
                                        <asp:Button ID="OkButton" runat="server"  Text="Remove"  CommandName="delete" CommandArgument='<%#Eval("CartID") %>'/>
                                        <asp:Button ID="CancelButton"  runat="server" Text="Cancel" />
                                    </p>
   </div>   

    

Try to use display flex for it

p {
  display: flex;
  align-items: center;
  justify-content: center;
}

p Button {
  width: 100px;
  height: 100px;
  border: 1px solid red;
}
  
  

Check it out https://jsfiddle.net/L95j0kd7/1/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM