c# - Cover entire row with a single column - width issue -
i have repeater & table controls. table has 1 column. when run code each cell in row covers around 25% (based on content of cell) of row & background color changes area only. want cell cover entire row. following code. set column width 100%, did not solve issue. not want hard code width cell.
<div style="overflow-y: auto; width: 100%; height: 395px; border: 0px solid #3c454f; background-color: #fffbe6; border: 0px solid #3c454f;"> <asp:repeater id="testlist" runat="server"> <headertemplate> <table> </headertemplate> <itemtemplate> <tr style="background-color: aqua; padding-top: 5px"> <td style="width: 100%;"> <%#container.dataitem%> </td> </tr> </itemtemplate> <alternatingitemtemplate> <tr style="background-color: white; padding-top: 5px"> <td style="width: 100%;"> <%#container.dataitem%> </td> </tr> </alternatingitemtemplate> <footertemplate> </table> </footertemplate> </asp:repeater> </div>
try one:
<div style="overflow-y: auto; width: 100%; height: 395px; border: 0px solid #3c454f; background-color: #fffbe6; border: 0px solid #3c454f;"> <asp:repeater id="testlist" runat="server"> <headertemplate> <table style="width:100%;"> </headertemplate> <itemtemplate> <tr style="background-color: aqua; padding-top: 5px"> <td style="width: 100%;"> <%#container.dataitem%> </td> </tr> </itemtemplate> <alternatingitemtemplate> <tr style="background-color: white; padding-top: 5px"> <td style="width: 100%;"> <%#container.dataitem%> </td> </tr> </alternatingitemtemplate> <footertemplate> </table> </footertemplate> </asp:repeater> </div>
Comments
Post a Comment