icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Coding and Programming » [html] Cutting words of in tables to prevent width from expanding?

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old November 24th, 2005, 2:28 PM   #1 (permalink)
Registered User
Comfy Contributor
 
Z`ohki's Avatar
 
Joined in Aug 2005
Lives in Netherlands
Hosted on Pass48
124 posts
Gave thanks: 0
Thanked 0 times
[html] Cutting words of in tables to prevent width from expanding?

Is it possible to make words cut themself off to prevent the cell from expanding?

I just got a example table like this :

Code:
<table width="10" border="1">
<tr>
	<td>
              blablablabalblablabla
	</td>
</tr>
</table>
When I do it like this for example :

Code:
<table width="10" border="1">
<tr>
	<td>
              b l a b lablabalblablabla
	</td>
</tr>
</table>
It cuts off at the spaces (or slashes), and puts the rest on a second line and still expands it.

Anybody know a solution to it? Thnx!
Z`ohki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 24th, 2005, 2:39 PM   #2 (permalink)
rocks your socks.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,170 posts
Gave thanks: 8
Thanked 35 times
Might want to google some stuff on wordwrap. I know you can prevent it with nowrap=nowrap, but I'm not sure how to do the opposite. Essentially, omitting the tag is supposed to cause wordwrap by default.
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 24th, 2005, 2:57 PM   #3 (permalink)
Registered User
Comfy Contributor
 
Z`ohki's Avatar
 
Joined in Aug 2005
Lives in Netherlands
Hosted on Pass48
124 posts
Gave thanks: 0
Thanked 0 times
Thanks, didn't know the word for it.. a quick search and I found this :

word-break: break-all;

It works, in IE. Not in Firefox/Opera. So I still need a multi-browser solution.
*continues search*
Z`ohki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 24th, 2005, 3:03 PM   #4 (permalink)
rocks your socks.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,170 posts
Gave thanks: 8
Thanked 35 times
Ah. Try some searching for it related to w3.org and it might come up with something on there.
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 24th, 2005, 5:45 PM   #5 (permalink)
Registered User
Comfy Contributor
 
Z`ohki's Avatar
 
Joined in Aug 2005
Lives in Netherlands
Hosted on Pass48
124 posts
Gave thanks: 0
Thanked 0 times
I found this :

table-layout: fixed;

Doesn't wrap around words, but it does keep the table width to the specified size, only the remaining piece of the word will disappear.

But I fixed it with the php function wordwrap();

Thnx for getting me on the right track =D
Z`ohki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 24th, 2005, 6:20 PM   #6 (permalink)
rocks your socks.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,170 posts
Gave thanks: 8
Thanked 35 times
No problem. Glad you solved it. I'll have to remember this in case I run across it as well.
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On