PDA

View Full Version : Columm.width (table a) == columm.width (table b)


Jerome
04-07-2003, 06:40 AM
Hi,

When I have 2 tables with the same amount of columms like:

<table id="a"><tr><td id="1"></td><td id="2"></td></tr></table>

and

<table id="b"><tr><td id="3"></td><td id="4"></td></tr></table>

How can I define that the first columm from both tables has the same width, so the width of columm id:1 and id:3 is the same.

Important remark: i can not define an actuall width, like 30% or 200px to the columm, the width depends on the data generated and placed in columm id:1

thead, tbody and tfoot are no option either.

Thanks for your effort,
Jerome

Roy Sinclair
04-07-2003, 10:10 PM
Sorry but with the list of things you say you can't do, the thing you want to do is eliminated as an option as well.

Jerome
04-08-2003, 01:24 PM
Hmmm,

Should it be possible to get width of id1 like

var howwidth=document.getElementById('id1').style.width;

and apply it to id3, like:

document.getElementById('id1').style.width=howwidth;

Or is this a weird approuce?

Jerome