![]() |
|
![]() | ||
|
Subject:
HTML Table in a Table
Category: Computers > Internet Asked by: dbarod-ga List Price: $2.50 |
Posted:
21 Aug 2002 08:34 PDT
Expires: 29 Aug 2002 09:00 PDT Question ID: 56961 |
I am displaying a table of data, about 20 rows by 4 columns. This table is embedded as a data cell in another table. I want the data cell it is embedded into to be only 5 rows long. How do I make the inner table scroll so that it will fit inside the outer table's data cell. The height attribute doesn't work. It's just ignored. I'd rather not use frames if I can help it. Thanks, Rod |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: HTML Table in a Table
From: razshm-ga on 21 Aug 2002 09:23 PDT |
Hi, the best way to be sure that the table won't change is to use IFrame. This TAG have cols and rows so you can change the height and width and get scroller if the Data is too long |
Subject:
Re: HTML Table in a Table
From: rungkutta-ga on 21 Aug 2002 21:27 PDT |
Try enclosing the inner table in a <div> element with the overflow attribute set to 'auto'. So presuming you're working inside a <td> element with the rowspan set to 5 (that is, for the 5 rows the inner table should take up in the enclosing table), the code looks something like this: <table><tr> ... <td rowspan=5> <div style="width:400; height:1000; overflow:auto"> <table cellspacing=2 cellpadding=0 border=1 width=184> <tr><td>R1 C1</td><td>R1 C2</td><td>R1 C3</td><td>R1 C4</td></tr> <tr><td>R2 C1</td><td>R2 C2</td><td>R2 C3</td><td>R2 C4</td></tr> ... <tr><td>R20 C1</td><td>R20 C2</td><td>R20 C3</td><td>R20 C4</td></tr> </table> </div> </td> ... </tr></table> You can also try the other overflow properties of 'visible' 'hidden' and 'scroll', depending on what you need. You can also mess with the width and height attributes of the <div> to ensure everything fits correctly. Probably easier to code than using an iframe. This works in IE 5+ (maybe 4 as well) and probably NN6, although I didn't check. Most likely won't work in older NN. |
Subject:
Re: HTML Table in a Table
From: dbarod-ga on 22 Aug 2002 06:39 PDT |
Thank you both for your help! I had seen these both before but wasn't aware they could solve my problem. I saw the <div> tag on my bank's internet site where it scrolled a table of trtansactions within a window, but just wasn't sure how it worked. Thanks again Rod |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |