Cell content being too long...

Discussion in 'HTML & Website Design' started by Darkhodge, Dec 12, 2006.

  1. #1
    Hey,


    I have a table with a specified width. However when the content is too long, for example "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss", it distorts the table so that the table becomes wide enough to accommodate the long word.

    I was just wondering if there was a way of overcoming this problem?


    Thanks,

    Hodge :)
     
    Darkhodge, Dec 12, 2006 IP
  2. dp-user-1

    dp-user-1 Well-Known Member

    Messages:
    794
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Try putting the following into the CSS:
    td {
    overflow-x: auto;
    }
    Code (markup):
     
    dp-user-1, Dec 12, 2006 IP
  3. leftybogs

    leftybogs Banned

    Messages:
    161
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    put scroll bar into yout table...
     
    leftybogs, Dec 13, 2006 IP
  4. Darkhodge

    Darkhodge Well-Known Member

    Messages:
    2,111
    Likes Received:
    76
    Best Answers:
    1
    Trophy Points:
    185
    #4
    So a scrollbar is the only option? I wanted to try and avoid that because they are ugly IMO but if it's the only option I suppose I'll have to...

    Thanks guys :)
     
    Darkhodge, Dec 13, 2006 IP
  5. shabbi_0015

    shabbi_0015 Peon

    Messages:
    227
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you should use the scroll bar to overcome this problem of yours.
     
    shabbi_0015, Dec 13, 2006 IP
  6. Trisha

    Trisha Active Member

    Messages:
    428
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    88
    #6
    A simple way is to put a hyphen in the word so that the second part drops down to the line below. eg Independently could read:
    Indep-
    endently
     
    Trisha, Dec 14, 2006 IP
  7. Darkhodge

    Darkhodge Well-Known Member

    Messages:
    2,111
    Likes Received:
    76
    Best Answers:
    1
    Trophy Points:
    185
    #7
    Thanks for the tip Trisha but the problem is the content of the cell is defined by the user so I have no control over the hyphen placement. :eek:
     
    Darkhodge, Dec 15, 2006 IP
  8. master06

    master06 Peon

    Messages:
    2,806
    Likes Received:
    121
    Best Answers:
    0
    Trophy Points:
    0
    #8
    maybe you can block this samples with your php codes if available.
     
    master06, Dec 15, 2006 IP
  9. Darkhodge

    Darkhodge Well-Known Member

    Messages:
    2,111
    Likes Received:
    76
    Best Answers:
    1
    Trophy Points:
    185
    #9
    Sorry to ask but what do you mean? :confused:
     
    Darkhodge, Dec 15, 2006 IP