Page 1 of 1

max width of a table

Posted: Fri Jun 15, 2012 1:54 pm
by mister_v
Hi,

The content of my HTML-pages are always in table,
because it is easy to place the content, the menu and other stuff.

I used to set the width of the table to 100% so the entire page is filled.
This was ok for screens of 1024x768 and 1280x960.
But it doesn't look so good on 1600x900 and bigger screens.

Isn't there a way you can set the max size and that it is still scalable.
I don't want a fix width, for smaller screen.

Thanks,

Re: max width of a table

Posted: Mon Jun 18, 2012 11:25 am
by chris
you can use max-width in css.

for example you can use the following class:

Code: Select all

.bigtable{max-width:1024px;valign:top;margin-left: auto;margin-right: auto}
max-width:1024px : The maximum size of your table will be 1024 pixels.
valign:top : position of the table
margin-left: auto;margin-right: auto : it centers you table in the middle of the page