[英]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.我想并排显示我的 modalpopupextender 内的按钮,而不是堆叠在一起。 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尝试使用 display flex
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/看看https://jsfiddle.net/L95j0kd7/1/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.