Repeater and Width dont wanna work together

Last post 02-03-2008 11:45 AM by Morten Jørgensen. 2 replies.

Sort Posts:

  • Repeater and Width dont wanna work together

    07-23-2007, 4:16 PM

    Hello there guys/ladies

     

    http://img377.imageshack.us/img377/1671/untitledcg0.jpg <-- That image speak for it self.

     

    The Source Code

      

        <asp:Repeater ID="Repeater1" runat="server">
    <HeaderTemplate><table></HeaderTemplate>

    <ItemTemplate>

    <td>
    <a href='<%# Eval("orgimg") %>' rel="lightbox" title='<%# Eval("picname") %>'><img src='<%# Eval("thumb") %>'></a><br /> <%# Eval("app") %> </td>


    </ItemTemplate>
    <FooterTemplate></table></FooterTemplate>

    </asp:Repeater>

     But i simply wont have a width tried table width:XX and Style="Width="xx"

     but i wont work...

     

    Is there any smart guys or ladies in here there can spot the error and maybe help me??

     

    sry for my bad english.. hope its understand able.
     

  • Re: Repeater and Width dont wanna work together

    07-23-2007, 6:53 PM
    Answer
    • All-Star
      21,646 point All-Star
    • gunteman
    • Member since 07-11-2007, 12:57 PM
    • Norrköping, Sweden
    • Posts 3,176

     The repeater just repeats stuff, and has no understanding of width etc. The problem here is that you are using a table, with lots of horizontal cells. A table will grow automatically to show all cells contained in a row.

     You should use a DIV element with aligned subelements (the img-elements or some other container) or take the DataList control out for a spin.

    http://dotnetjunkies.com/QuickStartv20/aspnet/doc/ctrlref/data/datalist.aspx
     

    -- "Mark As Answer" if my reply helped you --
  • Re: Repeater and Width dont wanna work together

    02-03-2008, 11:45 AM
    Thx Worked Mate :D
Page 1 of 1 (3 items)