gpt4 book ai didi

css - 当我使用转发器时,Bootstrap 扰乱了我的表格样式

转载 作者:太空宇宙 更新时间:2023-11-04 10:24:53 24 4
gpt4 key购买 nike

我有这段代码,我想按顺序组织它,但 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这是我的输出(屏幕截图),我想按行设置样式,以便当一行完成时,下一个表必须按顺序放置在新行中

最佳答案

<div class="clearfix"></div>

</ItemTemplate>之前添加以上代码这应该可以解决问题。

关于css - 当我使用转发器时,Bootstrap 扰乱了我的表格样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36865596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com