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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display a Table with a scrollbar

Status
Not open for further replies.

JohannIcon

Programmer
Sep 3, 2002
440
MT
Hello All,

I have a problem with displaying tables. Since not all of my tables contain the same date, they are not the same size. What I wish to do is have a standard table width and height, and if there is a lot of data to display, then a scrollbar at the end of the table field will appear and the user can scroll down or up as he wishes.

How can I do this?

Thanks for your help!
 
You can place your tables in <DIV> blocks - maybe something like this:

Code:
<STYLE>
#table  {width: 400; height: 300; overflow-x: none; overflow-y: auto;}
</STYLE>
</HEAD>

<BODY>
<DIV CLASS=table>
<TABLE ...>
...
</TABLE>
</DIV>
Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Hi FesterSXS,

Thanks for your reply. I am doing something similar like you mentioned here. Here is my code:-

<DIV style=&quot;width: 352; height: 229; overflow-x: hidden; overflow-y: auto;&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;3&quot;>
<tr>
<td width=&quot;25%&quot; bgcolor=&quot;F0F0F0&quot;>
<font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;>
<%Response.Write( rs.Fields(&quot;teu_year&quot;) )%>
</font></td>
<td width=&quot;75%&quot; bgcolor=&quot;F0F0F0&quot;>
<font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;>
<%Response.Write( rs.Fields(&quot;teu&quot;) )%>
</font></td>
</tr>
<%
rs.MoveNext
if rs.eof then
exit do
End If
loop until rs.eof
%>
</table>
</div>

The problem is that is scrollbar is appearing as I want it, however there is a lot of extra space between the table fields, for example I have a list of dates, and between the 2000 cell and the 2001 cell, there is a lot of white space. Can it be from the programming side?

THanks for your help
 
I managed to find the problem!!!! I was calling the recordset erroneously!

Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top