table:
<table align="center" width="300">
<tr>
<td>Text here</td>
</tr>
</table>div:
<div style="text-align:center;">
<div style="width:300px;text-align:left;">
Text here
</div>
</div>

解决方案 »

  1.   

    试了下, 不行 , 文字还是没有显示在小窗口中间。
    代码如下:
    <body>
        <table class="topic" cellSpacing="0" cellPadding="0" width="776" border="0">
    <tr>
        <td vAlign="top" align=center BackColor="#f4fbff"><%= Server.HtmlDecode(content)%>
        </td>
    </tr>
        </table>
    </body>
      

  2.   

    <body>
        <table class="topic" align=center cellSpacing="0" cellPadding="0" width="776" border="0">
    <tr>
        <td vAlign="top" align=center BackColor="#f4fbff"><%= Server.HtmlDecode(content)%>
        </td>
    </tr>
        </table>
    </body>
      

  3.   

    还是不行,代码如下:<%@ Page language="c#" Codebehind="NoticWindow.aspx.cs" AutoEventWireup="false" Inherits="WebNews.NoticWindow" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>
    <%=title%>
    </title>
    <META http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <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  bgColor="#f4fbff">
    <table cellSpacing="0" cellPadding="0" width="900" border="0" align="center">
    <tr>
    <td vAlign="top" align="center" ><font color=red size=4><%=Server.HtmlDecode(title)%></font>
    </td>
    </tr>
    <tr>
    <td height=4>
    </td>
    </tr>
    <tr>
    <td vAlign="top" align="left"><%=Server.HtmlDecode(content)%>
    </td>
    </tr>
    </table>
    </body>
    </HTML>