怎样在ASP.NET中令控件居中?即无论浏览器最大化还是常规,控件都在中间
我新建一个WEB窗体,在窗体的设计视图中拉一个Button控件在上面,但我在浏览器中看时,发觉无论浏览器放大还是缩小,它都在一个位置.我想它居中,怎么写代码呢?原代码如下:<%@ Page language="c#" Codebehind="ex04_01.aspx.cs" AutoEventWireup="false" Inherits="example.ex04_02.ex04_01" %><%@ Page language="c#" Codebehind="ex04_01.aspx.cs" AutoEventWireup="false" Inherits="example.ex04_02.ex04_01" %><%@ Page language="c#" Codebehind="ex04_01.aspx.cs" AutoEventWireup="false" Inherits="example.ex04_02.ex04_01" %><%@ Page language="c#" Codebehind="ex04_01.aspx.cs" AutoEventWireup="false" Inherits="example.ex04_02.ex04_01" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>ex04_01</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="ex04_01" method="post" runat="server">
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 298px; POSITION: absolute; TOP: 100px" runat="server" Text="Button"></asp:Button>
</form>
</body>
</HTML>
主要是怎样加上一个居中的语法,我不知怎加,求各位了
[此贴子已经被作者于2007-5-11 22:58:38编辑过]