我有这段代码,我想按顺序组织它,但bootstrap是令人不安的设计
<div class="col-lg-12 col-md-12 col-sm-12 row">
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<div class="col-md-4">
<div class="panel panel-danger">
<div class="panel-heading">
<asp:Label ID="lblCategoryId" runat="server" Text='<%#Eval("CategoryId") %>' Visible="false"> </asp:Label>
<img class="img-responsive" src="../images/<%#Eval("imgSrc")%>" /><h5 class="text-center" />
<%#Eval("Category") %> </h5>
</div>
<ul class="list-group list-group-flush text-center">
<asp:Repeater ID="Repeater2" runat="server" DataSourceID="SqlDataSource2">
<ItemTemplate>
<a>
<li id="liProdView" class="list-group-item">
<asp:LinkButton ID="LinkButton2" runat="server" PostBackUrl='<%#Eval("SubCategoryId","CustomerDetails.aspx?SubCategoryId={0}") %>'>
<%#Eval("SubCategory") %> ( <%#Eval("CompanyCount") %>)
</asp:LinkButton>
</li>
</a>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ServiceConnectionString %>"
SelectCommand="SELECT count(*) AS CompanyCount,dbo.tblCompanySubCategory.SubCategoryId, dbo.tblCompanySubCategory.SubCategory,
dbo.tblCompanySubCategory.CategoryId FROM dbo.tblCompany INNER JOIN dbo.tblCompanySubCategory ON
dbo.tblCompany.SubCategoryId = dbo.tblCompanySubCategory.SubCategoryId
WHERE (dbo.tblCompanySubCategory.CategoryId = @CategoryId)
GROUP BY dbo.tblCompanySubCategory.SubCategoryId, dbo.tblCompanySubCategory.SubCategory, dbo.tblCompanySubCategory.CategoryId">
<SelectParameters>
<asp:ControlParameter Name="CategoryId" ControlID="lblCategoryId" />
</SelectParameters>
</asp:SqlDataSource>
</ul>
<div class="panel-footer"><a class="btn btn-lg btn-block btn-primary" href="#">See more</a> </div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
enter image description here 这是我的输出(截图),我想在行中设置样式,以便当一行完成时,下一个表必须按顺序放置在新行中
答案 0 :(得分:1)
<div class="clearfix"></div>
在</ItemTemplate>
之前添加上述代码,以解决问题。