This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 805
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: 805
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scrollable table
 
Similar Threads
How to make the 'TH' field keep floating on pg up/pg dwn.. thanks :)
vertical scroller bar
God I hope someone has a solution...
CSS query
Scrolling problem with JSF