Click to See Complete Forum and Search --> : Scroll a part of table using Div tag


shanuragu
11-26-2003, 06:37 AM
HI

Can any one tell me how can I scroll a part of table coulmns using div tags??? Is it possible???

shara

TheBearMay
11-26-2003, 08:12 AM
It can be done using Javascript, but it's ugly because the div doesn't recognize the table boundries. Might want to consider running the scroll in a frame or iframe.

TomDenver
11-26-2003, 11:12 AM
If I understand your question, you can just put a <div> tag inside a <td> tag in your table. Use the following <div> and CSS style:

<div style="overflow:auto; height:200px;">Table content goes here</div>

If there's too much text or whatever content inside the div, it will add a vertical scroll bar for you. Make sure to set the height of the div, 200px is just an example, use whatever you need.

Paul Jr
11-26-2003, 01:28 PM
Why not just stick


style="overflow:auto;"


Into the table cell that you want to scroll? I'm not sure if that would actually work...

shanuragu
11-26-2003, 09:58 PM
My Table is as follows...

<table width="99%" border="0" cellpadding="2" cellspacing="2">
<tr>
<td width="24%" align="left" bgcolor="#dadada"><font class="shnText"><b>Customer Name</b></font></td>
<td width="18%" align="left" bgcolor="#dadada"><font class="shnText"><b>Invoice No</b></font></td>
<td width="14%" align="center" bgcolor="#dadada"><font class="shnText"><b>Invoice Date</b></font></td>
<td width="14%" align="center" bgcolor="#dadada"><font class="shnText"><b>Due Date</b></font></td>
<td width="12%" align="center" bgcolor="#dadada"><font class="shnText"><b>Invoice Amount</b></font></td>
<td width="18%" align="center" bgcolor="#dadada"><font class="shnText"><b>Billed From</b></font></td>
<td width="18%" align="center" bgcolor="#dadada"><font class="shnText"><b>Billed To</b></font></td>
</tr>
<%
While Not rsInvoice.EOF
%>
<tr>
<td width="24%" align="left"><font class="shnTextSmall"><%=rsInvoice("user_nm")%></font></td>
<!-- Div tag should start from here -->

<td width="18%" align="left"><font class="shnTextSmall"><%=rsInvoice("invoice_no")%></font></td>
<td width="14%" align="center"><font class="shnTextSmall"><%=rsInvoice("invoice_dt")%></font></td>
<td width="14%" align="center"><font class="shnTextSmall"><%=rsInvoice("due_dt")%></font></td>
<td width="12%" align="center"><font class="shnTextSmall"><%=rsInvoice("invoice_amt")%></font></td>
<td width="18%" align="center"><font class="shnTextSmall"><%=rsInvoice("billed_from_dt")%></font></td>
<td width="18%" align="center"><font class="shnTextSmall"><%=rsInvoice("billed_to_dt")%></font></td>
<!-- end here-->
</tr>
<%
rsInvoice.MoveNext
Wend
rsInvoice.MoveFirst
%>
</table>

Except the table column with name all other details should scroll from left to right.??? How can I do this??? Is it possible???

shara