469,289 Members | 2,330 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

2 Tables, same width in tds?

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 :)
Jul 23 '05 #1
2 1424
On 6 Nov 2004 16:36:43 -0800, in comp.lang.javascript
jo*******@hotmail.com (John Milton) wrote:
| 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.
-------------------------------------------------------------------
Dionisio, 17 Jan 2004
Jul 23 '05 #2
John Milton wrote:
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.
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mario T. Lanza | last post: by
2 posts views Thread by Griff | last post: by
4 posts views Thread by steve | last post: by
2 posts views Thread by Scamjunk | last post: by
32 posts views Thread by Simon Dean | last post: by
14 posts views Thread by Zkidd | last post: by
2 posts views Thread by Bouzy | last post: by
15 posts views Thread by Peter | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.