liongate
10-16-2007, 09:50 PM
I have created a simple page that displays data from a database in a table. The problem is, the cells are only as wide as the largest word in the data field. How can I use CSS to make the cells in the table automatically size to the length of the entire string of text from the data field? It seems like there should be a fairly simple way to do this with CSS. For example, if my (hypothetical) name was all in one field, my table would display my name like this, all in one cell:
Eugene
P.
Huppermittens
Here is the code I am using, which I obtained from the w3schools site:
<table border="1">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>")
next%>
</tr>
<%do until rs.EOF%>
<tr>
<%for each x in rs. Fields%>
<td><%Response.Write(x.value)%></td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
Eugene
P.
Huppermittens
Here is the code I am using, which I obtained from the w3schools site:
<table border="1">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>")
next%>
</tr>
<%do until rs.EOF%>
<tr>
<%for each x in rs. Fields%>
<td><%Response.Write(x.value)%></td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>