Forum Moderators: open

Message Too Old, No Replies

Sizing the cells of a 100% width table

<table> question

         

Emperor

2:11 am on Dec 13, 2005 (gmt 0)

10+ Year Member



Hi guys,

I want my <table> to be 100% width and the columns sized like this:

[to fit][leftover][to fit]

... the "to fit" means just big enough to fit the data and the "leftover" is, you guessed it, whatever width is left over after the "to fit" columns are sized.

I tried a few things and can't get it to work.

Thanks.

le_gber

11:12 am on Dec 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi emperor,

If you use css: give the tofit cols a width in px and leave the width of the leftover cell as auto ;

If you use html width do the same but leave the with of leftover empty.

hope this helps

kaled

12:18 pm on Dec 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



widths : 1% 100% 1%

Kaled.

tbear

9:08 pm on Dec 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Neat solution Kaled...... ;)

topsites

9:45 pm on Dec 13, 2005 (gmt 0)



shouldn't it be 1% 98% 1% ...?

just wondering...

kaled

10:23 pm on Dec 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You would think that all % settings should add up to 100 but in my experience, it really doesn't matter. I'm moving away from tables for layouts but I've used them extensively and it should be ok, that said, everything should be tested on the big three browsers (at least).

Kaled.