<asp:DataList ID="dlProduct" runat="server" RepeatColumns="3" RepeatDirection="Horizontal" CellSpacing="0" CellPadding="0" Width="600px" OnItemDataBound="dlProduct_ItemDataBound">
<ItemStyle/>
<ItemTemplate>
<table border="0" id="tbProduct" runat="server" style="height:250px;width:200px" cellpadding="2" cellspacing="0" >
<tr>
<td></td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
我实现的是每行均匀排列3个产品,如果我将table的宽设置为100%,那产品数量大于3个时就变得有宽有窄的(2个能均匀排列),如果我将其设置为固定宽度200px,那么产品数量小于3时又不均匀了,看看大家又没有什么好办法,使得各种情况都完美
<ItemStyle/>
<ItemTemplate>
<table border="0" id="tbProduct" runat="server" style="height:250px;width:200px" cellpadding="2" cellspacing="0" >
<tr>
<td></td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
我实现的是每行均匀排列3个产品,如果我将table的宽设置为100%,那产品数量大于3个时就变得有宽有窄的(2个能均匀排列),如果我将其设置为固定宽度200px,那么产品数量小于3时又不均匀了,看看大家又没有什么好办法,使得各种情况都完美
解决方案 »
- asp.net socket编程
- 从客户端XX中检测到有潜在危险的 Request.Form 值
- 请教各位高手,SharePoint2007中SSO如何配制?(顶者有分,解决后立马结贴)
- 关于javascript的问题
- 动态网页转换成静态html网页时如何把数据传过来?
- ASP.NET里有没有自带的时间相减的方法呢,找了半天全是相加的。
- 急,在线等!新闻系统,如何让子窗口的值返回并添加到父窗口的文本框中?
- 如何进入页面显示不同的图片
- 请大家帮忙看看:怎样能使datagrid中的dropdownlist在绑定数据的同时能够选定某一指定值?
- C#生成XML并添加注解
- 关于AD中添加用户后,必须重新启动IIS才能生效的问题(急)
- 有關于javascript訪問父窗口的子控件
<asp:DataList ID="dlProduct" runat="server" RepeatColumns="3" RepeatDirection="Horizontal" CellSpacing="0" CellPadding="0" Width="600px" OnItemDataBound="dlProduct_ItemDataBound">
<ItemStyle/>
<ItemTemplate>
<tr>
<td> </td>
</tr>
</ItemTemplate>
</asp:DataList></table> 你这样子试试看
<ItemStyle Width="30%"/>
<ItemTemplate>
<table border="0" id="tbProduct" runat="server" style="height:250px;width:100%" cellpadding="2" cellspacing="0" >
<tr>
<td> </td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>