Help with Table design

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jerrydigital
    New Member
    • Oct 2008
    • 67

    Help with Table design

    Hello,

    I have a table on my account page that allows users to view their account name and account balance. When they sign up, I am not sure how many accounts they have so I allow them to enter up to 5. However, when the table shows up in the account page, it has extra space if the user has anything less than 5 accounts. I also allow the user to enter a "other" account if they don't find their account on the drop down during registration. Is there any trick to eliminate this akward spacing? I have listed my table coding below. Thanks for any tips

    Code:
    <table width="30%" border="0" cellpadding="5" cellspacing="0"> 
    <tr><table border="2" cellpadding="5" cellspacing="3" bordercolor="black" bgcolor="black">
    <tr bgcolor="black">
    <tr bgcolor="silver">
    <th>Account</th>
    <th>Balance</th></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("account1")%></td>
    <td><%=objRS("balance1")%></td></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("otheraccount1")%></td>
    <td><%=objRS("balance1")%></td></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("account2")%></td>
    <td><%=objRS("balance2")%></td></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("otheraccount2")%></td>
    <td><%=objRS("balance2")%></td></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("account3")%></td>
    <td><%=objRS("balance3")%></td></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("otheraccount3")%></td>
    <td><%=objRS("balance3")%></td></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("account4")%></td>
    <td><%=objRS("balance4")%></td></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("otheraccount4")%></td>
    <td><%=objRS("balance4")%></td></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("account5")%></td>
    <td><%=objRS("balance5")%></td></tr>
    <tr valign="top" bgcolor="white">
    <td><%=objRS("otheraccount5")%></td>
    <td><%=objRS("balance5")%></td></tr>
    </table></td>
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    You could create the table using your server side scripting language. Generally the script first finds out much data it needs to display so it generates a table best suited for that data only.

    Comment

    Working...