Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Table trouble

td width acting weird...



5:19 pm on Jun 30, 2004 (gmt 0)

10+ Year Member

ok ...
Here is my code:

<table border="1" style="width:100%;">
<td colspan="2" style="width:100%;" align="center">Title!</td>
<td style="width:100px;">menu (100px)</td>
<td style="width:auto;">page (take all remaining space)</td>

I want the "menu" to be 100px ... STATIC
I want the "page" column to take "all the page" - 100px

It doesn't work under IE6 ... didn,t tried yet under FireFox, but anyway, it must work under IE... :\

any idea?


7:05 pm on Jun 30, 2004 (gmt 0)

10+ Year Member

CSS and tables don't always play too nicely together. Since you aren't really using classes and other abstractions, Why not change from

<td colspan="2" style="width:100%;" align="center">


<td colspan="2" width="100%" align="center">


<td wodth="100">menu (100px)</td>
<td width="100%">page (take all remaining space)</td>

The 100% will end up taking up 100% of the available space, so it should work. Actually, since your table is 100% width and you've specified a pixel width for the other td, the "take all remaining space" td shoulc do just that with no width specification whatsoever


11:06 am on Jul 1, 2004 (gmt 0)

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Hi and Welcome to WebmasterWorld fmaz!

in this case it's a wierd IE table bug.. not CSS ;)

it's triggered when colspan is used in conjuction with a width on the <td>.. sometimes, depending on the layout the only solution is to nest a table, but in the case of the code posted if you just remove the bold bit from the line below:

<td colspan="2" style="width:100%;" align="center">Title!</td>

it should play nice again, that particular cell will already know to be 100% wide because of the width on the overall table..



8:21 pm on Jul 1, 2004 (gmt 0)

10+ Year Member

Hum, thank's ...
for now, somethime I user a blank 1x1px gif and then I do something like this:

<img scr="transp.gif" width="100px" height="1px">

this solve some "min-width" problem.. but..
[cap] When did IE will work with REAL standar?[/cap]


Featured Threads

Hot Threads This Week

Hot Threads This Month