Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorjohn
    • CommentTimeNov 28th 2006
     
    I'm trying to make a webpage that will allow the user to expand or shrink his window, and the content of the page will expand or shrink to fit the window. BUT I have a problem: If the user has a very large monitor, the lines of text on the page will be very long and not very pleasant to read.

    Is there any way that I can specity a maximum width to the table that the text is inside of? I mean, is there any way that I can make the table expand to 100% of the width of the user's browser, but not exceed x pixels?

    To wit, something like this:


    <table width="100%" maxwidth="600">
    ...
    </table>

    I know that the "maxwidth" is invalid HTML, but is there any way that I can do that using HTML, JavaScript, or CSS?

    Thanks.
    • CommentAuthorphilips
    • CommentTimeNov 28th 2006
     
    max-width is valid CSS2 but only supported in NS7, Opera 7 and probably Mozilla. I don't believe it's supported in IE 6
    • CommentAuthorhardy
    • CommentTimeNov 28th 2006
     
    Maybe a 50% width div for text nested inside your 100% width table ?
    At 1280 X 1024 this would give you a 640px text div , while at 800 X 600 give you a 400px text div.

    Of course this is assuming that your 100% width table is 100% of the screen.