Scroll a part of table using Div tag

admin

Administrator
Staff member
HI<br />
<br />
Can any one tell me how can I scroll a part of table coulmns using div tags??? Is it possible???<br />
<br />
shara<!--content-->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.<!--content-->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:<br />
<br />
<div style="overflow:auto; height:200px;">Table content goes here</div><br />
<br />
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.<!--content-->Why not just stick<br />
<br />
<br />
style="overflow:auto;"<br />
<br />
<br />
Into the table cell that you want to scroll? I'm not sure if that would actually work...<!--content-->My Table is as follows...<br />
<br />
<table width="99%" border="0" cellpadding="2" cellspacing="2"><br />
<tr><br />
<td width="24%" align="left" bgcolor="#dadada"><font class="shnText"><b>Customer Name</b></font></td><br />
<td width="18%" align="left" bgcolor="#dadada"><font class="shnText"><b>Invoice No</b></font></td><br />
<td width="14%" align="center" bgcolor="#dadada"><font class="shnText"><b>Invoice Date</b></font></td><br />
<td width="14%" align="center" bgcolor="#dadada"><font class="shnText"><b>Due Date</b></font></td><br />
<td width="12%" align="center" bgcolor="#dadada"><font class="shnText"><b>Invoice Amount</b></font></td><br />
<td width="18%" align="center" bgcolor="#dadada"><font class="shnText"><b>Billed From</b></font></td><br />
<td width="18%" align="center" bgcolor="#dadada"><font class="shnText"><b>Billed To</b></font></td><br />
</tr><br />
<%<br />
While Not rsInvoice.EOF<br />
%><br />
<tr><br />
<td width="24%" align="left"><font class="shnTextSmall"><%=rsInvoice("user_nm")%></font></td><br />
<!-- Div tag should start from here --><br />
<br />
<td width="18%" align="left"><font class="shnTextSmall"><%=rsInvoice("invoice_no")%></font></td><br />
<td width="14%" align="center"><font class="shnTextSmall"><%=rsInvoice("invoice_dt")%></font></td><br />
<td width="14%" align="center"><font class="shnTextSmall"><%=rsInvoice("due_dt")%></font></td><br />
<td width="12%" align="center"><font class="shnTextSmall"><%=rsInvoice("invoice_amt")%></font></td><br />
<td width="18%" align="center"><font class="shnTextSmall"><%=rsInvoice("billed_from_dt")%></font></td><br />
<td width="18%" align="center"><font class="shnTextSmall"><%=rsInvoice("billed_to_dt")%></font></td><br />
<!-- end here--><br />
</tr><br />
<%<br />
rsInvoice.MoveNext<br />
Wend<br />
rsInvoice.MoveFirst<br />
%><br />
</table><br />
<br />
Except the table column with name all other details should scroll from left to right.??? How can I do this??? Is it possible???<br />
<br />
shara<!--content-->
 
Back
Top