This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 815
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: 815
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
CSS query
God I hope someone has a solution...
How to make the 'TH' field keep floating on pg up/pg dwn.. thanks :)
Scrolling problem with JSF
vertical scroller bar