This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

wrapping issue

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a problem with the wrap..
one of my <td> width is 150....but the content is like a big string without any spaces in between... so I wraped the content....but the cell width was expanding.. Here I am attaching the code just copy it and run...for your clear idea i used background colors..wrapping works fine but cell expanding??/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
function toggleSection( secid )
{
var sectionId = document.getElementById(secid);
if (sectionId == null) return;
if (sectionId.style.display == '')
{
sectionId.style.display = 'none';
} else {
sectionId.style.display = '';
}
}
function toggleCoaCmt( cmtId )
{
toggleSection('max_' + cmtId);
toggleSection('min_' + cmtId);
}
</script>
</head>
<body>
<form id="form1">
<table width="950" border="0" cellpadding="0" cellspacing="1" >

<tr bgcolor="#E0E0E0">
<td> </td>
<td width="225" bgcolor="#E0E0E0" class="datacellhead3" style="width:225px;word-wrap:break-word" wrap>
test COA 3 (achoy2 19-Oct-2007 at 00:14:27 EDT)
<br/>
<div id="coa_rpt_cmt_6" class="comment"></div>
</td>
<td width="25" bgcolor="#E0E0E0" class="datacell">hello</td>
<td width="80" bgcolor="#E0E0E0" class="datacell">01-Dec-2008</td>
<td width="80" bgcolor="#E0E0E0" class="datacell"></td>
<td width="90" bgcolor="#E0E0E0" class="datacell">Demonstrator</td>
<td width="70" bgcolor="#E0E0E0" class="datacell">Recommended: Not Required</td>
<td width="150" bgcolor="red" class="comment" wrap>
<div id="max_Status_1" style="float:left;background-color:yellow;word-wrap:break-word;width:150px">
<a href="javascript:toggleCoaCmt('Status_1')" >[+]</a>
testing123456789012345678901234567890123456...
</div>
<div id="min_Status_1" style="float:left;display:none;background-color:yellow;word-wrap:break-word;width:150px">
<a href="javascript:toggleCoaCmt('Status_1')" >[-]</a>
testing123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 (abcd1 19-Oct-2007 at 00:17:21 EDT) test (abcd1 19-Oct-2007 at 00:14:27 EDT)
</div>
</td>
<td width="10" align="center" bgcolor="#E0E0E0" class="datacell">3</td>
<td width="50" bgcolor="#E0E0E0" class="datacell" style="word-wrap:break-word">Melbourne</td>
<td width="50" bgcolor="#E0E0E0" class="datacell">Vehicles Sales</td>
<td width="50" bgcolor="#E0E0E0" class="datacell"></td>
</tr>
<tr>
<td colspan="12" bgcolor="#E0E0E0"> </td>
</tr>
</table>
</form>
</body>
</html>
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you specify a width, you need to include units.

Eric
 
prajwala solanki
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
means .... like width="150px"
i tried that one also....can you please run the code...and see the problem where its occuring ...because i am not so good in this alignment...with my knowledge i tried maximum possibilities...

when you click [+] link you will see the cell expansion....
 
prajwala solanki
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any possible way to fix width of a specific cell(mean i want to fix width of 6th column only)...so that i can fix this problem...
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic