|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
scrollable DIV with heading
I'd like to have a scrollable DIV where the headings always remain on the same place, no matter how deep you would scroll in the list.
If I write <DIV id=scroll1 style="BORDER:1px ; OVERFLOW: auto; WIDTH: 200px; HEIGHT: 100px; position: absolute; top:100; left:100;"> <table> <tr> <th>etappe</th> <th>leiding</th> <th>BO</th> </tr> <tr> <td>1</td> <td>11</td> <td>1011</td> </tr> <tr> <td>2</td> <td>12</td> <td>1012</td> </tr> <tr> <td>3</td> <td>13</td> <td>1013</td> </tr> <tr> <td>4</td> <td>14</td> <td>1014</td> </tr> <tr> <td>5</td> <td>15</td> <td>1015</td> </tr> </table> </DIV> I get the scrollable area, but the headings don't show when scrolling down. But on the other hand I loose the scrollable area when I write <table> <tr> <th>etappe</th> <th>leiding</th> <th>BO</th> </tr> <DIV id=scroll1 style="BORDER:1px ; OVERFLOW: auto; WIDTH: 200px; HEIGHT: 100px; position: absolute; top:100; left:100;"> <tr> <td>1</td> <td>11</td> <td>1011</td> </tr> <tr> <td>2</td> <td>12</td> <td>1012</td> </tr> <tr> <td>3</td> <td>13</td> <td>1013</td> </tr> <tr> <td>4</td> <td>14</td> <td>1014</td> </tr> <tr> <td>5</td> <td>15</td> <td>1015</td> </tr> </DIV> Can anyone help me out ? IFrames isn't an option, since I'd like to get this scrollable area inside my JSP's and iFrames give extra problems when submitting the FORM elements to the servlet. |
|
#2
|
|||
|
|||
|
There's 2 ways to do it, one would be by definging the width of each col - the other is just by cheating, as so:
Code:
<table style="position: absolute; top:80; left:100;"> <tr align=left> <th>etappe</th> <th>leiding</th> <th>BO</th> </tr> </table> <DIV id=scroll1 style="BORDER:1px ; OVERFLOW: auto; WIDTH: 200px; HEIGHT: 100px; position: absolute; top:100; left:100;"> <table style="position:absolute;top:-28"> <tr align=left> <th>etappe</th> <th>leiding</th> <th>BO</th> </tr> <tr> <td>1</td> <td>11</td> <td>1011</td> </tr> <tr> <td>2</td> <td>12</td> <td>1012</td> </tr> <tr> <td>3</td> <td>13</td> <td>1013</td> </tr> <tr> <td>4</td> <td>14</td> <td>1014</td> </tr> <tr> <td>5</td> <td>15</td> <td>1015</td> </tr> </table> </DIV> |
![]() |
| Viewing: Dev Shed Forums > Web Design > Web Design Help > scrollable DIV with heading |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|