Html Table wrap text to column

Discussion in 'HTML' started by CKKwan, Sep 3, 2008.

  1. CKKwan

    CKKwan Guest

    Dear All,

    I have a column in a table, where it will contain a lot of different
    things (e.g. Photo, link, another table, ....)

    The size of the column is not fix (and not specify at all), because
    different content will have different size, and the column will resize
    itself nicely.

    But there is one problem, if the column contain Text (a very long
    text), it will always cause the column to resize to its max.

    How can I ensure that the Text wrap according to the dynamic size of
    the column and DO NOT increase the colum n width?

    Thanks in advance.
     
    CKKwan, Sep 3, 2008
    #1
    1. Advertising

  2. CKKwan

    dorayme Guest

    In article <>,
    Ben C <> wrote:

    > On 2008-09-03, CKKwan <> wrote:
    > > Dear All,
    > >
    > > I have a column in a table, where it will contain a lot of different
    > > things (e.g. Photo, link, another table, ....)
    > >
    > > The size of the column is not fix (and not specify at all), because
    > > different content will have different size, and the column will resize
    > > itself nicely.
    > >
    > > But there is one problem, if the column contain Text (a very long
    > > text), it will always cause the column to resize to its max.
    > >
    > > How can I ensure that the Text wrap according to the dynamic size of
    > > the column and DO NOT increase the colum n width?

    >
    > Does the text contain breaking opportunities? If not, then you can't
    > force it to break (unless you mess around with word-break characters
    > gambling on either Unicode or the non-standard <wbr>)
    >
    > Otherwise setting a narrow width (e.g. 1px) on the cell containing the
    > text will in most browsers limit the effect of that cell on the width of
    > its column to at most stretching the column out to the cell's content
    > minimum width.


    Or perhaps settle on a max width, in whatever units suits, for an
    element like a <p> in which to hold the text.

    --
    dorayme
     
    dorayme, Sep 3, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. fitwell
    Replies:
    2
    Views:
    623
    fitwell
    Nov 13, 2003
  2. Guru
    Replies:
    1
    Views:
    4,708
  3. Aaron Fude

    To wrap or not to wrap?

    Aaron Fude, May 8, 2008, in forum: Java
    Replies:
    12
    Views:
    717
    Chronic Philharmonic
    May 10, 2008
  4. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 22, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    254
    Art Werschulz
    Sep 22, 2003
  5. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 24, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    257
    Anno Siegel
    Sep 25, 2003
Loading...

Share This Page