Table on web with css (I can not get it working)

Hi,

I want to have a table on the web (one column, opne row)

with is centered and size is 736, but isn’t resizable. (that’s also my problem)

I use this css file now:

#mytable {

width:736px}

This works fine when text is not bigger than 736px, if it’s bigger the table will also bigger

I’ve tried lots of things, but I can’t get it working.

Anyone an idea?

Thanks

Rgds,

Rudy

Subject: for fixed tables, use table-layout css property

Use table-layout:fixed; and for mozilla based browsers, you might need to tell it to clip the overflow.

#mytable {

table-layout:fixed;

width:736px;

overflow:hidden;}

btw, a side benefit of using table-layout:fixed and specifying the size of each of your columns, is that large tables load much faster. This is because the browser doesn’t have to calculate the size of each column for you.

Jack

Subject: RE: for fixed tables, use table-layout css property

Hi Jack,

Yes the table is now 736 pixels, only the text will not go to second line, when it’s bigger than 736 pixels.

Is this also possible?

Many thanks

Rgds,

Rudy

Subject: Table on web with css (I can not get it working)

Hi Rudy,that’s the nature of tables. Width is actually “minimum-width”. You might want to try to wrap your table in a div (or replace it since you mentioned one column one row). There you have more options with width and position. (And that might open another can of worms for you).

Eric Meyers CSS book is pretty good. Also http://www.alistapart.com/ has good CSS examples.

Hth

:wink: stw

Subject: Table Properties

You can use Table Properties > Layout tab to set all these parameters.

Subject: RE: Table Properties

set the width by wrapping your table in a div statement, eg “

Table here

The div statement should overrride the table.