在做项目时,用到了Datalist,设置了如下属性:
<asp:DataList ID="DataList1" runat="server" RepeatColumns="2" RepeatDirection="Horizontal" HorizontalAlign="Center"
onitemdatabound="DataList1_ItemDataBound" Width="100%">
<SeparatorStyle HorizontalAlign= "Center" VerticalAlign= "Top" Height="100%"> </SeparatorStyle>
<ItemStyle HorizontalAlign= "Center" BorderStyle= "None" VerticalAlign= "Top" Height="100%"> </ItemStyle>
<ItemTemplate>
<table cellpadding="0" cellspacing="0" style="width: 100%; border-style: solid; border-width: thin; border-color: #C0C0C0;" class="style1">
但是两个重复的单元之间却不是固定的,即:比如水平方向重复有A、B,A的内容多的话会挤兑B的区域,少的话又被B挤兑。如下图:
请高手指点下,另外,不要只说DIV+CSS,要贴具体代码的,谢谢啦!