Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you get a scrollbar on a table 1

Status
Not open for further replies.

theogary

Programmer
Mar 3, 2003
99
US
I have a cfoutput table which has links to other pages. The output exceeds the viewable page. I want this output only to be 3 inches high at most. I want a scrollbar on this output so the user can scroll through the data not the page. Is there a custom tag or javascript that can solve this problem.

 
theogary,


try using the <cfgrid> function.

<cfform action=&quot;&quot; method=&quot;POST&quot; enablecab=&quot;Yes&quot; name=&quot;name1&quot;>
<cfgrid name=&quot;grid1&quot; align=&quot;MIDDLE&quot; query=&quot;jsales&quot; insert=&quot;No&quot; delete=&quot;No&quot; sort=&quot;Yes&quot; font=&quot;Arial&quot; fontsize=&quot;10&quot; bold=&quot;No&quot; italic=&quot;No&quot; appendkey=&quot;No&quot; highlighthref=&quot;No&quot; griddataalign=&quot;LEFT&quot; gridlines=&quot;Yes&quot; rowheaders=&quot;No&quot; rowheaderalign=&quot;LEFT&quot; rowheaderitalic=&quot;No&quot; rowheaderbold=&quot;No&quot; colheaders=&quot;Yes&quot; colheaderalign=&quot;LEFT&quot; colheaderfontsize=&quot;12&quot; colheaderitalic=&quot;No&quot; colheaderbold=&quot;No&quot; selectmode=&quot;BROWSE&quot; maxrows=&quot;25&quot; picturebar=&quot;No&quot;>
</cfgrid>
</cfform>


This works in CF 5.0.

Jspellman
 
Try this:
<style>
#main
{
width:650;
height:160;
overflow:auto;
}
</style>
Then wrap your table in this div tag:
<div id=&quot;Main&quot;>
<table width=&quot;600&quot; border=&quot;0&quot; bgcolor=&quot;#000099&quot; style=&quot;border-collapse: collapse&quot;>&quot;Table Data&quot;</table>
 
<style>
#main
{
width:650;
height:160;
overflow:auto;
}
</style>
Then wrap your table in this div tag:
<div id=&quot;Main&quot;>
<table width=&quot;600&quot; border=&quot;0&quot; bgcolor=&quot;#000099&quot; style=&quot;border-collapse: collapse&quot;>&quot;Table Data&quot;</table></div>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top