<li>横向显示问题
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head runat= "server ">
<title> 无标题页 </title>
</head>
<body>
<form id= "form1 " runat= "server ">
<div style= "width:760px ">
<asp:Repeater ID= "re1 " runat= "server ">
<HeaderTemplate>
<ul style= "margin-left: 2px ">
</HeaderTemplate>
<ItemTemplate>
<li style= "float: left; margin-left: 5px; margin-right: 5px; white-space: nowrap ">
<%#Eval( "Sp_BqMc ")%>
</li>
</ItemTemplate>
<FooterTemplate>
</ul> </FooterTemplate>
</asp:Repeater>
</div>
</form>
</body>
</html>
-----------------------------
DataSet ds = new DataSet();
ds = exe.returnds( "SELECT top 40 SP_BQMC,MAX(SP_BQPH) AS PH FROM SP_BQ GROUP BY SP_BQMC order by PH desc ");
re1.DataSource = ds.Tables[0].DefaultView;
re1.DataBind();
-----------------------------
第二行的开始有很大一端空白,没有靠边显示.第三行到是靠边了.
高手指点 下.多谢
------解决方案--------------------repeater不需要当独对每个模板里设置对齐吧。
------解决方案--------------------每自动换完行加一个空
div
<div style= "clear:both; "> </div> 就行了