try this <td wrap.....
Main Topics
Browse All TopicsHi Experts,
I have an html table where i retrieve strings from a database and write them to a table. However, the rs("msg") field can be quite long, since it stores user's comments. When the table is displayed, the msg is displayed all on one line.
Is there a way to set word wrap for this column of the table so the msg gets displayed across several lines, but still within the same row/column? Thks.
<form method="post" action="" >
<table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr><td>Customer</td><td>M
<%
Dim rs
Set rs = RunStoredProc("Select * From tblAlertLog Order By timestamp desc", "query")
Do While Not rs.EOF
Response.Write("<tr><td>" & rs("CustID") & "</td><td>" & rs("msg") & "</td><td>" & rs("UserID") & "</td>")
Response.Write("<td>" & rs("type") & "</td><td>" & rs("timestamp") & "</td></tr>")
rs.MoveNext
Loop
%>
</table>
</form>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi Experts...
Even if you specify width then it will wrap automativcally but if my one word is more than the specified width then it will increase TD width in this case is there any way so that i can break down word itself or it should wrap for a word itself.
Please let me know whether it can be done or not..?
Thanks
Bharat
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>wordWrap property</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
<META NAME="AUTHOR" CONTENT="InetSDK">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META NAME="ROBOTS" CONTENT="noindex">
<LINK REL="stylesheet" HREF="/workshop/samples/au
<!-- This is the style rule that applies to the example. -->
<STYLE>
<!--
.WithBreaks { word-wrap:break-word; background-color:gainsboro
.NormalValue { word-wrap:normal; background-color:gainsboro
-->
</STYLE>
</HEAD>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#808080" ALINK="#000000">
<BLOCKQUOTE CLASS="body">
</HEAD>
<BODY>
<H1>wordWrap property</H1>
<P>The following examples show how the <B>wordWrap</B> property can be used to break one long word into multiple words on multiple lines.
The <SPAN class="clsLiteral">break-w
</P>
<P><B>Note</B> The <B>P</B> elements in the examples have layout because their widths are set.</P>
<P>This example shows the <SPAN class="clsLiteral">break-w
<P CLASS="WithBreaks">LongWor
<P>This example shows the <SPAN class="clsLiteral">normal<
<P CLASS="NormalValue">LongWo
<BR><BR><BR>
<HR>
<CENTER>
[Right-click in window to view the full source code.]
</CENTER>
<!-- START_PAGE_FOOTER -->
<BR><BR><BR>
© <A CLASS="clsIncCpyRt" HREF="http://www.microsoft
<!-- END_PAGE_FOOTER -->
</BLOCKQUOTE>
</BODY>
</HTML>
Business Accounts
Answer for Membership
by: bobbit31Posted on 2004-01-08 at 17:29:36ID: 10076975
specify the desired column widths and the way you have it, it should automatically wrap. You need to specify nowrap if you don't want the column to wrap. In your case, it seems as though the browser is allocating it's own cell widths since you didn't specify them.