Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2003
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help!:IS there a way Auto wrap text in a table cell..

    Is there a way to auto wrap text in a table cell?

    What I mean by this is if the text exceeds the dimensions of our cell can we force it to go to the next line instead pushing the cell over and making it larger!

    Thanks,

    Tsbarnes

  • #2
    New Coder
    Join Date
    Jan 2003
    Location
    1st floor, 3rd door on the right side
    Posts
    77
    Thanks
    1
    Thanked 0 Times in 0 Posts
    yes, you just need to define the width of the cell.

    Nevertheless, if one word is longer as the defined width, the cell becomes wider anyway.

    Hope this helps...

    Fred

  • #3
    New Coder
    Join Date
    Jan 2003
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help!:IS there a way Auto wrap text in a table cell..

    I guess that is where the reall challenge comes into play. In this particular cell that is all they are is groupings of letters and numbers to equal a partnumber.

    So I need to find something that if the characters are > a certain number then it forces a line break.

    Thanks,

    Tsbarnes

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Just make it the size of the largest part #.

    ...or try wrap="wrap"...

    ...or maybe a textarea in the cell.
    Last edited by zoobie; 01-07-2003 at 06:00 AM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #5
    wac
    wac is offline
    Regular Coder wac's Avatar
    Join Date
    Sep 2002
    Location
    Cary, North Carolina, USA
    Posts
    359
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Arghhh!!!! wrap is not a listed attribute in the W3C HTML 4.0 Spec.

    I'm having the same problem where my table is not wrapping text. I suspect because there's no spaces in the content (its an email address). The table is dynamically generated and the widths are configurable (via servlet stuff). I noticed that width is deprecated in the w3c spec. oddly enough the following note exists for the 'nowrap' attribute (I want wrap).

    Style sheets should be used instead of this attribute to achieve wrapping effects. Note. if used carelessly, this attribute may result in excessively wide cells

    Since my stuff is dynamically generated, I'm not sure that this is a viable option (I guess I can use the style attribute, so maybe this will work). How would one achieve strict character wrapping of a TD via style sheet? Is it as simple as style='width:30em' ???

    I guess I'll have to try it to see if this is any better than TD width='30em'

    (Who said rap is dead?!)
    Wayne Christian


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •