FineUI 官方论坛
标题:
FileUpload和Button处于Form中出现不对齐的问题
[打印本页]
作者:
唐铁明
时间:
2012-12-11 05:17
标题:
FileUpload和Button处于Form中出现不对齐的问题
<x
ageManager ID="
ageManager1" runat="server" />
<x
anel ID="
anel1" runat="server" BodyPadding="0px" EnableBackgroundColor="true"
ShowBorder="true" ShowHeader="true" Title="
anel">
<Items>
<x:Form ID="Form2" runat="server" BodyPadding="0px 0px 2px 0px" EnableBackgroundColor="true" LabelWidth="50px"
Title="Form">
<Rows>
<x:FormRow ID="FormRow1" runat="server">
<Items>
<x:FileUpload ID="FileUpload4" runat="server" Label="上传">
</x:FileUpload>
<x:Button ID="Button4" runat="server" Text="上传">
</x:Button>
</Items>
</x:FormRow>
<x:FormRow ID="FormRow2" runat="server" >
<Items>
<x:FileUpload ID="FileUpload1" runat="server" Label="上传" >
</x:FileUpload>
<x:Button ID="Button1" runat="server" Text="上传" >
</x:Button>
</Items>
</x:FormRow>
<x:FormRow ID="FormRow3" runat="server">
<Items>
<x:FileUpload ID="FileUpload2" runat="server" Label="上传">
</x:FileUpload>
<x:Button ID="Button2" runat="server" Text="上传">
</x:Button>
</Items>
</x:FormRow>
<x:FormRow ID="FormRow4" runat="server">
<Items>
<x:FileUpload ID="FileUpload3" runat="server" Label="上传" >
</x:FileUpload>
<x:Button ID="Button3" runat="server" Text="上传">
</x:Button>
</Items>
</x:FormRow>
</Rows>
</x:Form>
</Items>
</x
anel>
作者:
sanshi
时间:
2012-12-11 05:47
其实很简单,为按钮加个样式就行了,我写了一个示例:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="button_in_form.aspx.cs"
Inherits="FineUI.Examples.other.button_in_form" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<style>
.btn-in-form
{
margin-bottom: 4px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<x:PageManager ID="PageManager1" runat="server" />
<x:Form ID="SimpleForm1" BodyPadding="5px" Width="550px" LabelAlign="Left" LabelWidth="80px" EnableBackgroundColor="true"
Title="表单" runat="server">
<Rows>
<x:FormRow ID="FormRow5" runat="server">
<Items>
<x:TextBox ID="TextBox1" runat="server" Label="文本一">
</x:TextBox>
<x:Button ID="Button4" CssClass="btn-in-form" runat="server" Text="按钮一">
</x:Button>
</Items>
</x:FormRow>
<x:FormRow ID="FormRow6" runat="server">
<Items>
<x:TextBox ID="TextBox2" runat="server" Label="文本二">
</x:TextBox>
<x:Button ID="Button3" CssClass="btn-in-form" runat="server" Text="按钮二">
</x:Button>
</Items>
</x:FormRow>
<x:FormRow ID="FormRow7" runat="server">
<Items>
<x:TextBox ID="TextBox3" runat="server" Label="文本三">
</x:TextBox>
<x:Button ID="Button1" CssClass="btn-in-form" runat="server" Text="按钮三">
</x:Button>
</Items>
</x:FormRow>
<x:FormRow ID="FormRow8" runat="server">
<Items>
<x:TextBox ID="TextBox4" runat="server" Label="文本四">
</x:TextBox>
<x:Button ID="Button2" CssClass="btn-in-form" runat="server" Text="按钮四">
</x:Button>
</Items>
</x:FormRow>
</Rows>
</x:Form>
</form>
</body>
</html>
复制代码
作者:
唐铁明
时间:
2012-12-11 06:01
试了一下,解决了,谢谢了
作者:
sjxwb
时间:
2012-12-11 06:20
CssClass="btn-in-form" 管用。
欢迎光临 FineUI 官方论坛 (https://fineui.com/BBS/)
Powered by Discuz! X3.4