Anyone have any clue on how to show 4 items going horizontal with a repeater? A repeater shows items going down by default. Here is my test repeater code so far:
<table border=0 cellpadding=0 cellspacing=0 align="center" width="800px;>
<tr>
<asp:Repeater ID="rptTest" runat="server">
<ItemTemplate>
<td>
<h3><a href="<%#GetItemLink((Item)Container.DataItem) %>"><%#((WebMenuItem)Container.DataItem).Name %></a></h3>
<div>
<a href="<%#GetUrl((Item)Container.DataItem) %>">
<img src="<%#GetImage((Item)Container.DataItem) %>" alt="<%#GetAltText((Item)Container.DataItem) %>" />
</a>
</div>
</td>
</ItemTemplate>
</asp:Repeater>
</tr>
</table>
Use a ListView http://msdn.microsoft.com/en-us/library/bb398790.aspx
Try to set a CSS class for your
<td>
tags, and set an explicit width.Modifying Nick's suggestion I was able to use to make a 5 horizontal x n vertical Image Grid. Thanks Nick!
And here's ColorThumbnailImage
This might do the job (I'm assuming you may have more than one row of four images):
(no IDE so untested :)
If it doesn't help, some answers from this question might.
Scott Guthrie provided an example of how to do this with a ListView control in the following article. He uses the control to render an unordered list and uses CSS to control the layout.
Long live the humble repeater!