This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Scrollable table  RSS feed

 
m avalla
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you create a scrollable table using HTML?
Thanks!
 
Adithya Rayaprolu
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you always display just the vertical scrollbar (overflow:X:scroll)?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
overflow-x: scroll

that is IE only

Eric
 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
overflow-x is IE only or overflow in general is? Thanks.

Rob
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
overflow-x and overflow-y are IE only
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!