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

I dont want table cell to expand

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
On my page is a table, and one of those cells contains a single-celled table. The cell in the cell uses an #INCLUDE for it's contents. The problem is, it won't wrap the included text, it will only make the cell wider, which looks terrible. Theres gotta be a way to make the text wrap!

Thanks
 
have you set an absolute width (in pixels) for that <td> ??

like:

<td width=100>

anything appearing in a cell declared like that will wrap if the text exceeds a length of 100 pixels.

:)
Paul Prewett
 
Um...it didn't work. I'd rather use a %, I tried both ways and it didn't work. Here's the code:
<table width=&quot;100%&quot; border=0>

<tr>
<td valign=top width=10>
<table border=0>
<tr>
<td><!--#INCLUDE FILE=&quot;content.htm&quot;--></td>
</tr>
</table>
</td>
</tr></table>
 
Yea, that's because your table is set to be 100% -- and then you only give it one cell -- so the table width is overriding your cell width setting --

Try this:

<table width=&quot;100%&quot; border=0>

<tr>
<td valign=top width=10>
<table border=0>
<tr>
<td><!--#INCLUDE FILE=&quot;content.htm&quot;--></td>
</tr>
</table>
</td>
<td>Here's the other cell content</td>
</tr></table>

:)
 
No go, could it be with the inlcusion? it is a plain text file. I am reposting the full code (i edited it for readability the first time):
<HTML>
<HEAD>
</HEAD>
<BODY>
<table border=0>
<TR>
<td colspan=5><!--#INCLUDE FILE=&quot;header.htm&quot;--!
>center></td>
</TR>
<tr>
<td height=15 ></td>
</tr>
<tr>
<td valign=top width=&quot;15%&quot;>
<table border=0>
<tr>
<td><!--#INCLUDE FILE=&quot;nav.htm&quot;--></FONT></td>
</tr>
</table>
</td>
<td width=&quot;1%&quot;></td>
<td valign=top width=10%>
<table border=0>
<tr>
<td><!--#INCLUDE FILE=&quot;content.htm&quot;--></td>
</tr>
</table>
</td>
<td width=&quot;1%&quot;></td>
<td valign=top width=12%>
<table border=0>
<tr>
<td><!--#INCLUDE FILE=&quot;buttons.htm&quot;--></td>
</tr>
</table>
</td>
</tr>
</table>
</BODY>
</HTML>
You are a patient man.
 
Hi Mike,

Try this,

in your first table tag, define your table width as the sum of your five column width, which is &quot;15% + 1% + 10% + 1% + 12%&quot; = 39%

so your table will look something like
<table width=39% border=0>

hope this helps, Chiu Chan
WebMaster & Software Engineer
emagine solutions, inc
cchan@emagine-solutions.com
 
Dude, you won't believe this. The text file I was using consists of nothing but jibberish. You know:
l;asjl;sj;flkjas;ldkfj;laskdlf;ks;aldjf;lsad;fjl;asdj;fja

Well, guess what! There are very few spaces in jibberish!
It couldn't wrap cuz there was no where *to* wrap!
Suddenly, I hear my bed calling to me......


Tx for your time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top