HighDots Forums  

word wrap problem

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss word wrap problem in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
momo
 
Posts: n/a

Default word wrap problem - 09-28-2006 , 04:35 PM






say i have the following table:

<table width="500">
<tr>
<td width="250">this is the text im concerned with</td>
<td></td>
</tr>
</table>

i need the width of the columns to STAY at 250 and wrap text that is longer
instead of blowing apart the whole table.
the tag "word-wrap: break-word;" works, but is only supported in IE. what
can i do to fix this?



Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: word wrap problem - 09-28-2006 , 04:55 PM






momo wrote:

Quote:
say i have the following table:

table width="500"
tr
td width="250">this is the text im concerned with</td
td></td
/tr
/table
Then you should move to doing layout in CSS. Or at least stop setting
pixel-valued widths. Do you really want to break your page whenever someone
views it in a window that is, say, 450 pixels wide?

Besides, you didn't give a _real_ example, did you? The phenomenon that you
describe cannot be seen by testing your example.

Quote:
i need the width of the columns to STAY at 250
No you don't. Analyze why you want that, and you'll find your _real_
problem.

Quote:
the tag "word-wrap: break-word;" works,
For some odd values of "works", and it's not a tag at all. When it "works",
it brutally breaks words with no indication like hyphens, so it seriously
distorts that.

Quote:
what can i do to fix this?
Redesigning the site is the fastest way, and realistically the only way.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #3  
Old   
Spartanicus
 
Posts: n/a

Default Re: word wrap problem - 09-28-2006 , 05:09 PM



"momo" <js (AT) js (DOT) com> wrote:

Quote:
say i have the following table:

table width="500"
tr
td width="250">this is the text im concerned with</td
td></td
/tr
/table

i need the width of the columns to STAY at 250 and wrap text that is longer
instead of blowing apart the whole table.
The table cell width will stay at 250px provided that the cell content
can be wrapped within that width. The cell content (and eventually the
table itself) will stretch if the cell content cannot be wrapped within
the specified width.

Quote:
the tag "word-wrap: break-word;" works, but is only supported in IE. what
can i do to fix this?
Font zooming will eventually cause the table to stretch, but it would
take a fair amount of zooming given the provided "content" and cell
width.

It would have been much better if you had provided an url to what you
are actually trying to do instead of posting bogus content and markup.

Btw, this would not be an issue if you had used tables for their
intended purpose instead of using them for layout.

--
Spartanicus


Reply With Quote
  #4  
Old   
momo
 
Posts: n/a

Default Re: word wrap problem - 09-29-2006 , 08:50 AM



here is an example of what i need to do. i would greatly appreciate it if
someone has a fix

http://www.sixhouse.net/wrap.html



"Spartanicus" <invalid (AT) invalid (DOT) invalid> wrote

Quote:
"momo" <js (AT) js (DOT) com> wrote:

say i have the following table:

table width="500"
tr
td width="250">this is the text im concerned with</td
td></td
/tr
/table

i need the width of the columns to STAY at 250 and wrap text that is
longer
instead of blowing apart the whole table.

The table cell width will stay at 250px provided that the cell content
can be wrapped within that width. The cell content (and eventually the
table itself) will stretch if the cell content cannot be wrapped within
the specified width.

the tag "word-wrap: break-word;" works, but is only supported in IE. what
can i do to fix this?

Font zooming will eventually cause the table to stretch, but it would
take a fair amount of zooming given the provided "content" and cell
width.

It would have been much better if you had provided an url to what you
are actually trying to do instead of posting bogus content and markup.

Btw, this would not be an issue if you had used tables for their
intended purpose instead of using them for layout.

--
Spartanicus



Reply With Quote
  #5  
Old   
Spartanicus
 
Posts: n/a

Default Re: word wrap problem - 09-29-2006 , 11:46 AM



Please do not top post, corrected this once.

"momo" <js (AT) js (DOT) com> wrote:

Quote:
It would have been much better if you had provided an url to what you
are actually trying to do instead of posting bogus content and markup.

here is an example of what i need to do. i would greatly appreciate it if
someone has a fix

http://www.sixhouse.net/wrap.html
More bogus markup and content, I'm not willing to continue a discussion
on that basis.

--
Spartanicus


Reply With Quote
  #6  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: word wrap problem - 09-29-2006 , 04:01 PM



Scripsit momo:

Quote:
here is an example of what i need to do. i would greatly appreciate
it if someone has a fix

http://www.sixhouse.net/wrap.html
Try reading comprehensively some of the answers you got, instead of randomly
quoting comprehensively one of them.

You are not helping us to help you when you don't describe the real problem.
Your content is surely not "this_is_the_text_that_i_need_to_wrap", and if
breaking at random points is a solution, as you seem to think, then you have
an odd problem.

What you need to do is to get rid of the rigid layout and to set up some
processing of the data you get from the database, whether it be truncation
or insertion of spaces or insertion of <wbr> tags.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.