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

limiting table width possible?

Status
Not open for further replies.

nuct

Programmer
Sep 5, 2001
103
Hi

Does anyone know if its possible to limit the width of a table so that however long a string inside a cell is the table remains the same size. The width attribute doesn't seem to work, the table just seems to stretch anyway.

Any ideas?

Cheers,
Simon.
 
No. If it is a picture or a long string without spaces, then the table will expand to accomodate it. There is one way of clipping it or making the cell have scrollbars:
Code:
<table>
 <tr>
  <td>
   <div style="overflow: hidden; width: 100px;">content will 
be clipped</div>
  </td>
 </tr>
 <tr>
  <td>
   <div style="overflow: auto; width: 100px;">content will be scrollable</div>
  </td>
 </tr>
</table>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top