Search code examples
asp.netrepeater

Repeater items are not showing horizontally?


I want to make some image and text as dynamically so i change items in to repeater.data is coming but repeater is showing vertically that is shown horizontally without repeater in html code.so please help to change it into horizontal view am attaching the images .images shown what i need and how it look like now with my code..

I want to change items align horizontally using repeater now it is showing vertically.so please help me actual code my code by using repeater actual design my design with repeater


Solution

  • Your col-md-2 divs should naturally appear horizontally within a row, but you are giving each item in your repeater their own container and row. Moving those divs outside of the repeater should fix your problem.

    <div class="container">
      <div class="row news-list">
        <asp:Repeater>
          <ItemTemplate>
            <div class="col-md-2">
              ...
            </div>
          </ItemTemplate>
        </asp:Repeater>
      </div>
    </div>