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

Text wrap... 2

Status
Not open for further replies.

skiflyer

Programmer
Sep 24, 2002
2,213
US
I'm having several problems with text wrapping today (what fun!), the simple kind too, not even around stuff.

Anyway, first question... I have a table, with some info in it, no matter what happens I want this info all on one line, widen the column if necessary, scroll off to the right if need be, truncate it, whatever... but instead, it's going on two lines, is there a CSS command to help me with this? Google is bein no help this afternoon.

Thanks,
Rob
 
Code:
<body><table><tr><td nowrap>asdfsdaf asdfsdaf asdfsdaf asdfsdaf asdfsdaf asdfsdaf asdfsdaf asdfsdaf asdfsdaf asdfsdaf asdfsdaf 
asdfsdaf asdfsdaf asdfsdaf asdfsdafasdfsdafasdfsdafasdfsdaf  asdfsdaf asdfsdaf asdfsdaf asdfsdaf</td></tr></table>
</body>

here you go

the nowrap attribute can be use with body, and div as well

now if you specify a width for the cell or table then that will cancel out the nowrap.

this link from MS should explain better what I have above


<Signature>
Sometimes the Answer You Are LOOKING for can be FOUND BY SEARCHING THE FAQ'S @&%$*#!!!
</Signature>
 
what i meant to say is that nowrap overrules the width of cells and divs

<Signature>
Sometimes the Answer You Are LOOKING for can be FOUND BY SEARCHING THE FAQ'S @&%$*#!!!
</Signature>
 
or since you were looking for a css solution:

<td style=&quot;white-space: nowrap;&quot;>This won't wrap</td>
 
ahh... the CSS solution is even better, seeing as all these cells already have a class, thanks to you both.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top