日期:2014-05-17  浏览次数:20731 次

<div>无法居中,很是蛋疼!
[code=html]
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="Bookcase.SiteMaster" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
    <title></title>  
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
    <style type="text/css">
        *{margin:0;padding:0;}
        #top{background-image:url(Images/bg_header.jpg);width:1000px;height:200px;text-align: center;}
        #top2{background-image:url(Images/bg_menu.jpg);width:1000px;height:30px;text-align:right;}
        #top2_1{float:left;}
        #top2_2{float:right;}
        #whole{width:100%;text-align: center;}
        
        #footer{background-image:url(Images/bg_footer.gif);height:25px;}
        body{text-align: center;}
        #center { MARGIN-RIGHT: auto; MARGIN-LEFT: auto; }
        

        
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="whole">
        <div>
        <div id="top"></div>
        <div id="top2"> 
        <div id="top2_1">
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Label ID="labUser" runat="server" Text=""></asp:Label>
            <asp:Button ID="btnCanceled" runat="server" Text="注销" onclick="btnCanceled_Click" />
        </div>
        <div id="top2_2">
            <a href="Home.aspx" class="s1">首 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;页</a><span class="s2"> | </span>
            <asp:HyperLink runat="server" ID="GRGL" NavigateUrl="Information.aspx" CssClass="s1">个人管理</asp:HyperLink><asp:Label runat="server" CssClass="s2">|</asp:Label>
            <asp:HyperLink runat="server" ID="SJ" NavigateUrl="Bookshelf.aspx" CssClass="s1">书 &nbsp;&