Here's the problem. I have a DIV tag with a overflow-x value set so that it will scroll if it exceeds the borders of it's width. But not only does it apply the scroll bar but it also expands the table that it is sitting in, and crushes the cell to it's left.
<table height=83% border=1>
<tr height=100%>
<td width=100 height=100%>
</td>
<td valign=top>
<div id=main style="position:relative;;width:100%;overflow-x:auto;">
<%
SQL = "Select * from mytable"
RS.open SQL, conn
howmanyfields =rs.fields.count-1
response.write "<table><tr>"
for i=0 to howmanyfields
response.write ("<td>" & rs(i).name & "</td>" & Chr(13))
next
response.write "</tr>"
do until rs.eof
response.write "<tr>"
for i=0 to howmanyfields
response.write "<td>" & rs(i) & "</td>" & Chr(13))
next
response.write "</tr>"
rs.movenext
%>
</table>
</div>
</td>
</tr>
</table>
The problem is when the recordset that is created is bigger than the width of the page it does create the scroll bar on the DIV tag, but only after it expands the table that holds the tag until it is wide enough to fit the entire recordset.
I am not really worried about the page extending beyond the bottom, becuase it will need to scroll down anyway. It's just the X value that I am worried about...
Anyone know what is causing this, and how to fix it?
<table height=83% border=1>
<tr height=100%>
<td width=100 height=100%>
</td>
<td valign=top>
<div id=main style="position:relative;;width:100%;overflow-x:auto;">
<%
SQL = "Select * from mytable"
RS.open SQL, conn
howmanyfields =rs.fields.count-1
response.write "<table><tr>"
for i=0 to howmanyfields
response.write ("<td>" & rs(i).name & "</td>" & Chr(13))
next
response.write "</tr>"
do until rs.eof
response.write "<tr>"
for i=0 to howmanyfields
response.write "<td>" & rs(i) & "</td>" & Chr(13))
next
response.write "</tr>"
rs.movenext
%>
</table>
</div>
</td>
</tr>
</table>
The problem is when the recordset that is created is bigger than the width of the page it does create the scroll bar on the DIV tag, but only after it expands the table that holds the tag until it is wide enough to fit the entire recordset.
I am not really worried about the page extending beyond the bottom, becuase it will need to scroll down anyway. It's just the X value that I am worried about...
Anyone know what is causing this, and how to fix it?