javascript - how to display products using Repeater control ASP.NET -
i using repeater control display results e commerce website shows, mean horizontaly , vertically well, repeater displaying results in list want show 4 items per row second row third row, showing items top bottom straight line list, please tell me , how can display items want them to,i have seen answers here not working that's why posting question
<asp:repeater id="repeater1" runat="server"> <itemtemplate> <div class="span4" style="width:187px" runat="server"> <div class="products"> <a href="='<%# eval("id") %>'"> <img alt="" src='<%# eval("imagelink") %>' height="195" width=""></a> <br/> <h3 class="title" style="font-family:pristina;font-size:medium; width:auto;"> <%# eval("name") %></h3> <p class="price" style="font-family:pristina;font-size:medium;"><b>price</b> <%# eval("price") %></p> <a href="<%#eval("link") %>" style="font-family:'malgun gothic';font-size:medium;">www.shophive.com</a> </div> </div> </itemtemplate> </asp:repeater>
the way want products display shown in image, , filling repeater dataset, want output like these items displayed
- wrap repeater control in
<div>
, give fixed width. add
style="display:inline-block;"
<div class="span4"
<div style="width: 900px;"> <asp:repeater id="repeater1" runat="server"> <itemtemplate> <div class="span4" style="display:inline-block;" runat="server"> <div class="products"> <a href="='<%# eval("id") %>'"> <img alt="" src='<%# eval("imagelink") %>' height="195" width=""></a> <br /> <h3 class="title" style="font-family: pristina; font-size: medium; width: auto;"><%# eval("name") %></h3> <p class="price" style="font-family: pristina; font-size: medium;"><b>price</b> <%# eval("price") %></p> <a href="<%#eval("link") %>" style="font-family: 'malgun gothic'; font-size: medium;">www.shophive.com</a> </div> </div> </itemtemplate> </asp:repeater> </div>
Comments
Post a Comment