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

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