Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi I have a page with 3 column their data come from data base an I use <asp:repeater>
it works but when I have one row in two columns and two or much rows in third column two column be shown in center of page not on top of page how can I resolve it?
thanks.
ASP.NET
    <tr style="height: 100%">
        <td style="width: 21%;">
             </td>

        <td class="auto-style33" style="width: 15%">
           <asp:Repeater ID="Repeater1" runat="server"
      DataSourceID="SqlDataSource3">
  <ItemTemplate>
      <table style="width: 100%">
          <tr>
              <td>
    <asp:Panel ID="Panel2" runat="server" BackColor="White" BorderWidth="1px" BackImageUrl="~/images/back_b.jpg" CssClass="panel-item4" Width="100%">
                <table style="width: 100%; height: 214px;" >
                    <tr>
                        <td style="text-align: center; height: 97px;">
                            <asp:Image ID="Image9" runat="server" Height="88px" ImageUrl='<%# Eval("ImagePath")%>' Width="70%" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; border-top-style: dotted; border-top-width: thin; ">
                                  </td>
                    </tr>
                    <tr>
                        <td style="text-align: center"><a class="b" href='<%# Eval("FilePath")%>'>
                            <asp:Label ID="Label40" runat="server" CssClass="onhover" Text='<%# Eval("FileName")%>' Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                            </a></td>
                    </tr>
                    <tr>
                        <td style="text-align: center">

                            <asp:Label ID="Label41" CssClass="onhover" runat="server" Text='<%# Eval("Noskhe")%>' Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center">

                            <asp:Label ID="Label42" CssClass="onhover" runat="server" Text='<%# Eval("Vighegi")%>' Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; height: 20px;">

                            <asp:Label ID="Label43" CssClass="onhover" runat="server" Text='<%# Eval("Updatetime")%>' ForeColor="#DE3922" Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; height: 20px;"></td>
                    </tr>
                </table>
            </asp:Panel>
              </td>
          </tr>
      </table>


</ItemTemplate>
                 </asp:Repeater>
                        </td>
        <td style="width: 7%;"> </td>

        <td style="width: 15%; ">
              <asp:Repeater ID="Repeater9" runat="server"
      DataSourceID="SqlDataSource2">
   <ItemTemplate>
        <table  style="width: 100%">
          <tr>
              <td>
            <asp:Panel ID="Panel3" runat="server" BackColor="White" BorderWidth="1px" BackImageUrl="~/images/back_b.jpg" CssClass="panel-item4" Width="100%">
                <table style="width: 100%; height: 214px;" >
                    <tr>
                        <td style="text-align: center; height: 97px;">
                            <asp:Image ID="Image11" runat="server" Height="88px" ImageUrl='<%# Eval("ImagePath")%>' Width="70%" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; border-top-style: dotted; border-top-width: thin; ">
                                  </td>
                    </tr>
                    <tr>
                        <td style="text-align: center"><a class="b" href='<%# Eval("FilePath")%>'>
                            <asp:Label ID="Label451" runat="server" CssClass="onhover" Text='<%# Eval("FileName")%>' Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                            </a></td>
                    </tr>
                    <tr>
                        <td style="text-align: center">

                            <asp:Label ID="Label50" CssClass="onhover" runat="server" Text='<%# Eval("Noskhe")%>' Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center">

                            <asp:Label ID="Label48" CssClass="onhover" runat="server" Text='<%# Eval("Vighegi")%>' Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; height: 20px;">

                            <asp:Label ID="Label49" CssClass="onhover" runat="server" Text='<%# Eval("Updatetime")%>' ForeColor="#DE3922" Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; height: 20px;"></td>
                    </tr>
                </table>
            </asp:Panel>
                  </td>
              </tr>
            </table>

</ItemTemplate>
                  </asp:Repeater>
             </td>
        <td style="width: 7%;"> </td>

        <td style="width: 15%; ">
           <asp:Repeater ID="Repeater2" runat="server"
      DataSourceID="SqlDataSource1">
  <ItemTemplate>
       <table  style="width: 100%">
          <tr>
              <td>
            <asp:Panel ID="Panel3" runat="server" BackColor="White" BorderWidth="1px" BackImageUrl="~/images/back_b.jpg" CssClass="panel-item4" Width="100%">
                <table style="width: 100%; height: 214px;" >
                    <tr>
                        <td style="text-align: center; height: 97px;">
                            <asp:Image ID="Image11" runat="server" Height="88px" ImageUrl='<%# Eval("ImagePath")%>' Width="70%" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; border-top-style: dotted; border-top-width: thin; ">
                                  </td>
                    </tr>
                    <tr>
                        <td style="text-align: center"><a class="b" href='<%# Eval("FilePath")%>' >
                            <asp:Label ID="Label451" runat="server" CssClass="onhover" Text='<%# Eval("FileName")%>' Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                            </a></td>
                    </tr>
                    <tr>
                        <td style="text-align: center">

                            <asp:Label ID="Label50" CssClass="onhover" runat="server" Text='<%# Eval("Noskhe")%>' Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center">

                            <asp:Label ID="Label48" CssClass="onhover" runat="server" Text='<%# Eval("Vighegi")%>' Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; height: 20px;">

                            <asp:Label ID="Label49" CssClass="onhover" runat="server" Text='<%# Eval("Updatetime")%>' ForeColor="#DE3922" Font-Names="Tahoma" Font-Size="X-Small"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center; height: 20px;"></td>
                    </tr>
                </table>
            </asp:Panel>
                  </td>
              </tr>
            </table>

</ItemTemplate>
          </asp:Repeater>
               </td>
        <td style="width: 20%;">
             </td>
    </tr>
Posted
Comments
PhilLenoir 28-Aug-14 9:25am    
I would read up on position attributes (static/absolute/relative). here are a couple of good explanations:
http://www.barelyfitz.com/screencast/html-training/css/positioning/
http://designshack.net/articles/css/the-lowdown-on-absolute-vs-relative-positioning/

When you REALLY understand these things, you're off to the races!

1 solution

I could resolve my problem with this css code:
CSS
#product_viewer td {

vertical-align: top;

}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900