PDA

View Full Version : Table resize problem


rolf
07-28-2003, 01:55 PM
I have a serious problem with an HTML table. I have a page where the user must be able to enter data in a textbox. I opted to use <div>'s and set the ContentEditable property to true. The reason for this is that I have to 'grow' the textboxes as the user enters text.

The problem is that I have a fixed width table and it resizes as my <div>'s go over to a next line (using the WORD-WRAP: break-word;) style attrib. I would appreciate any ideas on this. Here is the HTML:

<TABLE style="WIDTH: 645px" cellSpacing="2" cellPadding="2" border="1">
<TBODY>
<TR>
<TD style="WIDTH: 255px">Please enter the text here:</TD>
<TD style="width: 350px">
<DIV ContentEditable=true style="width: 250px; WORD-WRAP: break-word"></DIV>
</TD>
<TD style="width: 40px">&nbsp;</TD>
</TR>
</TBODY>
</TABLE>

rolf
07-28-2003, 02:49 PM
I have found the reason why it happens - it still doesn't solve my problem though. The word-wrap attrib. seems to be 'bugged'. the moment even one space is entered in a row of text - it breaks the line after the first set of spaceless(if the there is such a thing :)) charachters. and the next set is displayed on the next line.

Does this make sense if you set the word-wrap to break-word ? It either doesn't or I am useless.