This is due to the way you use <DIV> in your templates.
As you did, each group of 3 goes to <DIV> , and each element is below the other inside this div due to your <br /> in <ItemSeparatorTemplate> .
Then the next group of 3 goes next to the last group of 3.
The solution you should try is to remove <ItemSeparatorTemplate> and modify <GroupTemplate> to add <br /> after each group:
<GroupTemplate> <div runat="server" id="Images" class="ImagePageGroup"> <div runat="server" id="ItemsGoHere"> </div> </div> <br /> </GroupTemplate>
also note that in the microsoft example they use <table> to format the list.
Update:
I checked your code and your problems - CSS issue . I got a good result by placing width:250px; into the ImagePageGroup class and width:50px; float: left; width:50px; float: left; to the ImagePageItem class, but I don't know your CSS. With this style you donβt need <br /> at all , so I split it up.
You can test your div layout as plain HTML. Of course, the easiest solution is to switch to a table layout. A table is not evil when you use them to display Tabular data , but that is another matter.
source share