我需要居中对齐面板。我使用以下内容:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestDefault.aspx.cs" Inherits="tregware.TestDefault" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:Panel ID="Root" runat="server" BackColor="Red" HorizontalAlign="Center" Style="left: 0px; top: 0px; width: 100%; height: 100%; position: absolute; z-index: 0;">
<asp:Panel ID="Body" runat="server" BackColor="Blue"
Style="left: 0px; top: 24px;width: 800px; height: 100%; position: absolute; z-index: 0;"
HorizontalAlign="Center">
</asp:Panel>
</asp:Panel>
</form>
</body>
</html>
但是面板(“Body”)不会居中。我该怎么做?