Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by pzozulka
at 2024-07-26 18:50:52
Point:500 Replies:4 POST_ID:828617USER_ID:10
Topic:
C# Programming Language;Hypertext Markup Language (HTML);Cascading Style Sheets (CSS)
I have a C# application sending out emails with a basic HTML table (see HTML code below). The problem is that when the users reply to the email and try to fill out the 3rd column of that table, the text does not wrap, and the width of the table continues to grow.
How do I make the words wrap?
How do I make the words wrap?
<HTML><HEAD></HEAD><BODY><style type="text/css">table.tftable {font-size:12px;color:#1F497D;border-width: 2px;border-color: #4BACC6; padding-left:5em; border-collapse: collapse;}</style><table id="tfhover" class="tftable" border="1" cellpadding='5' cellspacing='3'> <tr align='center'> <td></td> <td><font face='Arial,sans-serif' size='2' color='#1F497D'><b>Yes or No</b></font></td> <td width="300"><font face='Arial,sans-serif' size='2' color='#1F497D'><b>Comments</b></font></td> </tr> <tr bgcolor='#D2EAF1'> <td><font face='Arial,sans-serif' size='2' color='#1F497D'><b>Was the reporter on time?</b></font></td> <td></td> <td></td> </tr> <tr> <td><font face='Arial,sans-serif' size='2' color='#1F497D'><b>Was the reporter professional in his/her <br> appearance?</b></font> </td> <td></td> <td></td> </tr> <tr bgcolor='#D2EAF1'> <td><font face='Arial,sans-serif' size='2' color='#1F497D'><b>Did the reporter carry out his/her duties<br> competently, facilitating the deposition<br> process?</b></font> </td> <td></td> <td></td> </tr> <tr> <td><font face='Arial,sans-serif' size='2' color='#1F497D'><b>Would you like to work with this reporter <br> again?</b></font> </td> <td></td> <td></td> </tr> <tr bgcolor='#D2EAF1'> <td><font face='Arial,sans-serif' size='2' color='#1F497D'><b>Is there anything you would like us to know?</b></font></td> <td></td> <td></td> </tr></table></BODY></HTML> 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:22:23:24:25:26:27:28:29:30:31:32:33:34:35:36:37:38:39:40:41:42:43:44:45:46:47:48:49:50:51:52:
Expert: duncanb7 replied at 2024-07-28 12:00:51
I think that is what pzozulka and his users/clients want to get with the following final answer
table.tftable {table-layout:fixed;word-wrap:break-word;width:600px;font-size:12px;color:#1F497D;border-width: 2px;border-color: #4BACC6; padding-left:5em; border-collapse: collapse;}
Expert: skullnobrains replied at 2024-07-28 11:57:13
you seem to have answers above, but it does wrap in my FF
does your application change spaces to " " by any chance ?
if that is the case word-wrapping will not work. at best you'll end up with hidden text or text flowing outside of the table. you'd need to leave spaces unchanged, or change them back using js, or do the word-wrapping yourself
does your application change spaces to " " by any chance ?
if that is the case word-wrapping will not work. at best you'll end up with hidden text or text flowing outside of the table. you'd need to leave spaces unchanged, or change them back using js, or do the word-wrapping yourself
Accepted Solution
Expert: duncanb7 replied at 2024-07-27 07:33:32
450 points EXCELLENT
Dear pzuzulka,
I hope I can understand your question clearly
You need to fix the table width so the table width won't continue to grow even the user
fill in long string.
add it in CSS with table-layout:fixed;word-wrap:break-word;width:600px
besides word-wrap:break-word, also need fix the table width by table-layout:fixed and width:####px that you want the width to fix at #### size
(Please reminded set the width for each colume at first row only if need )
Duncan
I hope I can understand your question clearly
You need to fix the table width so the table width won't continue to grow even the user
fill in long string.
add it in CSS with table-layout:fixed;word-wrap:break-word;width:600px
table.tftable {table-layout:fixed;word-wrap:break-word;width:600px;font-size:12px;color:#1F497D;border-width: 2px;border-color: #4BACC6; padding-left:5em; border-collapse: collapse;}
besides word-wrap:break-word, also need fix the table width by table-layout:fixed and width:####px that you want the width to fix at #### size
(Please reminded set the width for each colume at first row only if need )
Duncan
Assisted Solution
Expert: mcnute replied at 2024-07-27 01:00:12
50 points EXCELLENT
Try to apply this style inline: