Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1616 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

wrap long string in a table

Thread title: wrap long string in a table
Closed Thread    
    Thread tools Search this thread Display Modes  
08-27-2006, 11:59 AM
#1
NeedCode is offline NeedCode
Status: Junior Member
Join date: Aug 2006
Location:
Expertise:
Software:
 
Posts: 25
iTrader: 0 / 0%
 

NeedCode is on a distinguished road

Send a message via Yahoo to NeedCode

  Old  wrap long string in a table

I have a table defined with dynamic content being pushed into each cell. The problem I have is occassionally there may be a word or two that is so long it exceeds the width of the column and it stretches the entire table out.

I am looking for a way to instruct the system to break that long string and wrap it so the table dimensions always remain constant.

Any ideas?

08-27-2006, 01:54 PM
#2
Cheetah Designs is offline Cheetah Designs
Status: I'm new around here
Join date: Aug 2006
Location: London
Expertise:
Software:
 
Posts: 5
iTrader: 0 / 0%
 

Cheetah Designs is on a distinguished road

Send a message via MSN to Cheetah Designs

  Old

Which server side scripting are you using?

There are normally functions that will do this for you.

You could also try putting this in your cell tag:

Code:
wrap="physical"
I am not sure that it will work though.

08-27-2006, 02:06 PM
#3
NeedCode is offline NeedCode
Status: Junior Member
Join date: Aug 2006
Location:
Expertise:
Software:
 
Posts: 25
iTrader: 0 / 0%
 

NeedCode is on a distinguished road

Send a message via Yahoo to NeedCode

  Old

I tried this, unfortunately it did not work. I think this is for textarea only. My data is in the <td> part of a table.

08-29-2006, 06:45 PM
#4
LeetPCUser is offline LeetPCUser
LeetPCUser's Avatar
Status: Member
Join date: Aug 2006
Location: Wisconsin
Expertise:
Software:
 
Posts: 132
iTrader: 0 / 0%
 

LeetPCUser is on a distinguished road

Send a message via AIM to LeetPCUser Send a message via MSN to LeetPCUser Send a message via Yahoo to LeetPCUser

  Old

Has anyone noticed when you write code on this forum it breaks the width? Can an admin alter the CSS file?

Have you set the width of the table? That might help.

08-31-2006, 08:16 PM
#5
Wildhoney is offline Wildhoney
Wildhoney's Avatar
Status: Request a custom title
Join date: Feb 2006
Location: Nottingham
Expertise:
Software:
 
Posts: 1,648
iTrader: 18 / 95%
 

Wildhoney is on a distinguished road

Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney

  Old

max-width: xx px

I'm not entirely sure on it's behaviour in isolation with no spaced text. I do, however, know of a function in PHP which will perform the action you're after:

PHP Code:
wordwrap($str20'<br />'."\n"); 
The arguments being: [Text] [Characters] [Terminate With]

09-02-2006, 04:19 PM
#6
NeedCode is offline NeedCode
Status: Junior Member
Join date: Aug 2006
Location:
Expertise:
Software:
 
Posts: 25
iTrader: 0 / 0%
 

NeedCode is on a distinguished road

Send a message via Yahoo to NeedCode

  Old

The wordwrap function worked perfectly! Thanks!

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed