Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / September 2006



Tip: Looking for answers? Try searching our database.

word wrap problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
momo - 28 Sep 2006 21:35 GMT
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?
Jukka K. Korpela - 28 Sep 2006 21:55 GMT
> say i have the following table:
>
[quoted text clipped - 4 lines]
>    </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.

> 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.

> 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.

> what can i do to fix this?

Redesigning the site is the fastest way, and realistically the only way.

Signature

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

Spartanicus - 28 Sep 2006 22:09 GMT
>say i have the following table:
>
[quoted text clipped - 7 lines]
>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.

Signature

Spartanicus

momo - 29 Sep 2006 13:50 GMT
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

>>say i have the following table:
>>
[quoted text clipped - 26 lines]
> Btw, this would not be an issue if you had used tables for their
> intended purpose instead of using them for layout.
Spartanicus - 29 Sep 2006 16:46 GMT
Please do not top post, corrected this once.

>> 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.

Signature

Spartanicus

Jukka K. Korpela - 29 Sep 2006 21:01 GMT
Scripsit momo:

> 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.

Signature

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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.