|
Posted by Jukka K. Korpela on 06/07/06 21:36
mike hengins <no@spam.com> scripsit:
> Hi, I have a basic HTML question :
I don't think it's a basic HTML question; it's actually rather advanced. I
don't know whether this matters, but you may have some reason for writing
that you have a basic HTML question.
> How do i set the properties of a table so that it breaks a long word
> like "abcdefghijklmnopqrstuvwxyz"
You don't.
> (this long word is dynamically generated),
So how could a poor lonesome browser know how it can be broken?
A word, or a "word", can be broken in (at least) two ways: just breaking it
at some point, so that a line break is just inserted somewhere, or as
hyphenation. Both are problematic. It's impossible to say which one you need
when you only gave a dummy example.
For the relevant technicalities in HTML, see
http://www.cs.tut.fi/~jkorpela/html/nobr.html#suggest
> I tried many things, like width and height, they will not cut it.
They are not supposed to.
Setting table-layout: fixed in CSS "forces" specified widths, but this is
mostly part of the problem, not solution. You would need to consider
including spaces, or explicit line break opportunities, or even explicit
line breaks. The table cell content might still overflow. How would you plan
to handle it?
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|