aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Scrollable table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Scrollable table" Watch "Scrollable table" New topic
Author

Scrollable table

m avalla
Greenhorn

Joined: Oct 02, 2002
Posts: 10
How do you create a scrollable table using HTML?
Thanks!
Adithya Rayaprolu
Ranch Hand

Joined: Jun 19, 2001
Posts: 137
Using Div tag, style overflow, you can create scrollable table.
<div style="overflow:X:auto; width: 200px;">
<table.....></table>
</div>
The above code will generate a table which scroll horizontally, not vertically.
<div style="overflow:auto; width:200px; height:300px"><table...></table>
</div>
This code will generate both vertically and horizontally scrollable table. If you want the scrollbars to appear all the time, just use overflow:scroll. overflow:auto will generate scroll bars only when needed. If the table width and height are within those specified by div tag, you will not get scrollbars.
HTH.
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 826
How do you always display just the vertical scrollbar (overflow:X:scroll)?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
overflow-x: scroll

that is IE only

Eric
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 826
overflow-x is IE only or overflow in general is? Thanks.

Rob
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
overflow-x and overflow-y are IE only
 
 
subject: Scrollable table