How to make max table width 100%?

Discussion in 'HTML & Website Design' started by meamrussian, Sep 30, 2007.

  1. #1
    I have a table that I want to stretch only the maximum width of the browser window. But, if I put a very long string of letters without spaces into the table, and it becomes longer than the table width, the whole table becomes messed up, and horizontal scroll bars appear. How do I stop this? I want the long text to break to the next line instead.

    I heard there is a css max-width option, but it doesn't work in IE. Any other options?

    Thanks.
     
    meamrussian, Sep 30, 2007 IP
  2. 8everything

    8everything Peon

    Messages:
    16,349
    Likes Received:
    903
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Have you tried:

    <table cellspacing="0" cellpadding="0" width="%100"><tr><td>

    </tr></td></table>

    ?
     
    8everything, Sep 30, 2007 IP
  3. meamrussian

    meamrussian Active Member

    Messages:
    782
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Did you mean width="100%"? Yeah, I've tried that of course. It still stretches everything to fit the long string of text.

    Thanks.
     
    meamrussian, Sep 30, 2007 IP