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

  1. wrap repeater control in <div> , give fixed width.
  2. 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> 

output: enter image description here


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -