我写好了一个CSS,用html页面测试是正常的,但是一换到asp.net里就没有效果了~~~
麻烦高手看看,以下是代码
还有,我人说,要在css的样式前加上.net控件的ID,就是加上#MessageList,但我加了还是不行
 body
body 
 {
{ }{
}{ margin:0px;
    margin:0px; padding:0px;
    padding:0px; font-size:9pt;
    font-size:9pt; font:"宋体";
    font:"宋体"; color:#000000;
    color:#000000; text-align:center;
    text-align:center; }
}
 #content
#content
 {
{ }{
}{ padding:20px;
    padding:20px; width:790px;
    width:790px; height:auto;
    height:auto; text-align:center;
    text-align:center; }
}
 #content #message
#content #message
 {
{ }{
}{ padding:1px;
    padding:1px; padding-bottom:15px;
    padding-bottom:15px; margin-top:20px;
    margin-top:20px; width:700px;
    width:700px; height:auto;
    height:auto; border:dashed;
    border:dashed; border-width:1px;
    border-width:1px; border-color:#86C1FD;
    border-color:#86C1FD; text-align:left;
    text-align:left; }
}
 #content #message #top
#content #message #top
 {
{ }{
}{ padding:0px;
    padding:0px; margin:0px;
    margin:0px; height:13px;
    height:13px; background:#177CE1;
    background:#177CE1; }
}
 #content #message ul
#content #message ul
 {
{ }{
}{ text-align:left;
    text-align:left; list-style-type:none;
    list-style-type:none; margin:0px;
    margin:0px; padding:0px;
    padding:0px; padding-left:15px;
    padding-left:15px; padding-right:15px;
    padding-right:15px; 
     }
}
 #content #message ul li
#content #message ul li
 {
{ }{
}{ margin-top:15px;
    margin-top:15px;     }
}
 #content #message ul #time
#content #message ul #time
 {
{ }{
}{ text-align:right;
    text-align:right; }
}

 <%
<% @ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="_Default" %>
@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="_Default" %>
 <!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 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">
<head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/css.css" rel="stylesheet" type="text/css" /> <title>三层简易留言板</title>
    <title>三层简易留言板</title> </head>
</head> <body>
<body> <form id="form1" runat="server">
    <form id="form1" runat="server"> <div>
        <div> <asp:DataList ID="MessageList" runat="server">
            <asp:DataList ID="MessageList" runat="server"> <HeaderTemplate>
                <HeaderTemplate> <div id="content">
                    <div id="content"> </HeaderTemplate>
                </HeaderTemplate> <ItemTemplate>
                <ItemTemplate> <div id="message">
                    <div id="message"> <div id="top">
                        <div id="top"> </div>
                        </div> <ul>
                        <ul>
 <li>留言者:<%
                            <li>留言者:<% # DataBinder.Eval(Container.DataItem,"Name","{0}") %></li>
# DataBinder.Eval(Container.DataItem,"Name","{0}") %></li>
 <li>内容:<%
                            <li>内容:<% # DataBinder.Eval(Container.DataItem,"Content","{0}") %></li>
# DataBinder.Eval(Container.DataItem,"Content","{0}") %></li>
 <li id="time">时间:<%
                            <li id="time">时间:<% # DataBinder.Eval(Container.DataItem,"AddTime","{0}") %></li>
# DataBinder.Eval(Container.DataItem,"AddTime","{0}") %></li> </ul>
                        </ul> </div>
                    </div> </ItemTemplate>
                </ItemTemplate> <FooterTemplate>
                <FooterTemplate> </div>
                    </div> </FooterTemplate>
                </FooterTemplate> </asp:DataList>
            </asp:DataList> </div>
        </div> </form>
    </form> </body>
</body> </html>
</html>
 米脂
米脂 
					大话西游666
 
					慕标琳琳
 
					慕田峪9158850
 
					蓝山帝景
 随时随地看视频慕课网APP
随时随地看视频慕课网APP