2 Tables, same width in tds?

J

John Milton

Hi all

I have a table with data in it, adn the tds inside the table get their
width automatic...

but, i have above this table another table, and i want the tds inside
this table to be the same size as the tds in the below table

note that both tables in the same width, and both has same number of
tds in a tr.

I dont have the style.width property (it shows ""), so i tried to take
the width from clientWidth, but when i set style.width =
otherTable.clientWidth, the js change the value. I cant put
clientWidth = otherTable.clientWidth cuz it's read only..

Help please :)
 
J

Jeff North

On 6 Nov 2004 16:36:43 -0800, in comp.lang.javascript
| Hi all
|
| I have a table with data in it, adn the tds inside the table get their
| width automatic...
|
| but, i have above this table another table, and i want the tds inside
| this table to be the same size as the tds in the below table
|
| note that both tables in the same width, and both has same number of
| tds in a tr.
|
| I dont have the style.width property (it shows ""), so i tried to take
| the width from clientWidth, but when i set style.width =
| otherTable.clientWidth, the js change the value. I cant put
| clientWidth = otherTable.clientWidth cuz it's read only..
|
| Help please :)

<table width="100%" .....

for each table.
-------------------------------------------------------------------
Leviticus 18:22 (KJV): "Thou shalt not lie with mankind, as with
womankind it is abomination."

Well, "duh!" Men don't often ask "Does this make me look fat?"
So, of course, we don't have to lie with men like we do with women.
 
R

RobG

John said:
I dont have the style.width property (it shows ""), so i tried to take

If you do not set the width, then the td will not have a width
attribute. IE may be different, it sometimes assigns a value to
properties even if you haven't.

In general, if you want them to have the same width, you must set the
width for each column in each tale to the same value.

Rob.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top