By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

Help with Table design

P: 67

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

Expand|Select|Wrap|Line Numbers
  1. <table width="30%" border="0" cellpadding="5" cellspacing="0"> 
  2. <tr><table border="2" cellpadding="5" cellspacing="3" bordercolor="black" bgcolor="black">
  3. <tr bgcolor="black">
  4. <tr bgcolor="silver">
  5. <th>Account</th>
  6. <th>Balance</th></tr>
  7. <tr valign="top" bgcolor="white">
  8. <td><%=objRS("account1")%></td>
  9. <td><%=objRS("balance1")%></td></tr>
  10. <tr valign="top" bgcolor="white">
  11. <td><%=objRS("otheraccount1")%></td>
  12. <td><%=objRS("balance1")%></td></tr>
  13. <tr valign="top" bgcolor="white">
  14. <td><%=objRS("account2")%></td>
  15. <td><%=objRS("balance2")%></td></tr>
  16. <tr valign="top" bgcolor="white">
  17. <td><%=objRS("otheraccount2")%></td>
  18. <td><%=objRS("balance2")%></td></tr>
  19. <tr valign="top" bgcolor="white">
  20. <td><%=objRS("account3")%></td>
  21. <td><%=objRS("balance3")%></td></tr>
  22. <tr valign="top" bgcolor="white">
  23. <td><%=objRS("otheraccount3")%></td>
  24. <td><%=objRS("balance3")%></td></tr>
  25. <tr valign="top" bgcolor="white">
  26. <td><%=objRS("account4")%></td>
  27. <td><%=objRS("balance4")%></td></tr>
  28. <tr valign="top" bgcolor="white">
  29. <td><%=objRS("otheraccount4")%></td>
  30. <td><%=objRS("balance4")%></td></tr>
  31. <tr valign="top" bgcolor="white">
  32. <td><%=objRS("account5")%></td>
  33. <td><%=objRS("balance5")%></td></tr>
  34. <tr valign="top" bgcolor="white">
  35. <td><%=objRS("otheraccount5")%></td>
  36. <td><%=objRS("balance5")%></td></tr>
  37. </table></td>
Nov 18 '08 #1
Share this Question
Share on Google+
1 Reply

P: 13,264
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.
Nov 18 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.