69 users online (0 members and 69 guests)  


  Results 1 to 15 of 15

Related

  1. Wrapping text around a cell in a table    Forum: HTML Forum
    Replies: 0
  2. Replies: 4
  3. I need to wrap a table around my select box    Forum: CGI Perl Forum
    Replies: 0
  4. How to make text wrap like this?    Forum: HTML Forum
    Replies: 3
  5. HTML table cell alignment    Forum: HTML Forum
    Replies: 1
  1. #1
    Ravi's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2004
    Posts
    2

    Unhappy wrap text in a cell of a html table

    hai ..
    i have created a new table with two rows..each row consists of one single column...
    i have given a fixed width for the columns...but when a single word exceeds that width,the table is expanded...
    i dont want that to happen...tell me some way by which i can have the fixed column width,even if the data may increase in size..the problem comes only when a single word is bigger than the width that i have given for the columnwidth in the table.. can i wrap that single word by any means..

    here is that table...

    <TABLE WIDTH="100" BGCOLOR="#B6EBFF" BORDER="3" CELLSPACING="4"
    CELLPADDING="4">
    <TR>
    <TD ALIGN="CENTER">
    this is the header

    </TD>
    </TR>
    <TR>
    <TD ALIGN="LEFT" BGCOLOR="FFFEA8">
    this is the text

    </TD>
    </TR>
    </TABLE>

    it works fine...

    but when the data is "thisisthetextabcdefghijkl" instead of "this is the text"...the table is expanded...

  2. #2
    Sayan
    Sayan's Avatar
    Guest
    Use the style WORD-BREAK:BREAK-ALL; the breaking happens even if there is no delimiters in the text

  3. #3
    Sayan
    Sayan's Avatar
    Guest

    Thumbs up Quick and effective solution

    Use the style WORD-BREAK:BREAK-ALL; the breaking happens even if there is no delimiters in the text

  4. #4
    Ravi's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2004
    Posts
    2
    thanx.. i tried it .. and it works good...thanx sayan..
    thanx...

  5. #5
    mohangandhic's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2005
    Posts
    1
    Thank you Sayan.... Its working fine. g8...

  6. #6
    ashokpegada's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2007
    Posts
    1

    Re: how can i wrap the text in a cell of a html table

    this is great!!! it works for me. thanks a lot.

  7. #7
    vittu's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    2

    Re: how can i wrap the text in a cell of a html table

    That's Great, it's working for me. Thanku very much.

  8. #8
    vittu's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    2

    Re: how can i wrap the text in a cell of a html table

    Hi Sayan, the style WORD-BREAK:BREAK-ALL; is working fine for IE but for Fire Fox it's not working. Can you plz post the solution for Firefox also. Thanks in advance.

  9. #9
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: how can i wrap the text in a cell of a html table

    Hi there vittu,

    word-break:break-all, at present, is IE only.

    I believe that you will need to wait for the implementation of CSS3 for cross-browser usage.

  10. #10
    teltone's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2008
    Posts
    1

    Re: how can i wrap the text in a cell of a html table

    Hi sayan and coothead ..
    is there any other attribute or way to wrap a text line in table to support all browsers like IE or Mozila an opera safari ...
    thanks in advance

  11. #11
    oldbuddy's Avatar
    New User

    Status
    Offline
    Join Date
    May 2008
    Location
    Oregon
    Posts
    18

    Re: how can i wrap the text in a cell of a html table

    Just curious, but since you are entering the text yourself can't you manually break it?

  12. #12
    loveyj's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2008
    Posts
    1

    Re: how can i wrap the text in a cell of a html table

    I had the same issue, I just put a <br /> where I needed the text to wrap and it worked fine.

    I used the <br /> in the middle of a link and it did not disrupt the functionality of the link.

    Hope this works for you too.

  13. #13
    raheem786's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2010
    Posts
    1

    Re: how can i wrap the text in a cell of a html table

    Quote Originally Posted by coothead View Post
    Hi there vittu,

    word-break:break-all, at present, is IE only.

    I believe that you will need to wait for the implementation of CSS3 for cross-browser usage.
    Thanks yaar.. it working fine

  14. #14
    sushya76's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2010
    Posts
    1

    Smile Re: wrap text in a cell of a html table

    Hi Sayam,

    Thanks this is very useful information. I was looking for this information from years.

  15. #15
    iimraann's Avatar
    New User

    Status
    Offline
    Join Date
    May 2011
    Posts
    1

    Thumbs up Re: wrap text in a cell of a html table

    Thanks man...
    This is exactly what I was combing the net for...