Connecting Tech Pros Worldwide Help | Site Map

synchronizing 2 tables' columns width

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 05:36 PM
abs
Guest
 
Posts: n/a
Default synchronizing 2 tables' columns width

Hi everybody.

My problem: there are two tables. Their columns' widths are set by the
content. Do you have any idea how to set the width of the second table's
columns to be the same as width of adequate columns in the first table ?

Best regards,
ABS



  #2  
Old July 23rd, 2005, 05:36 PM
Evertjan.
Guest
 
Posts: n/a
Default Re: synchronizing 2 tables' columns width

abs wrote on 06 feb 2005 in comp.lang.javascript:
[color=blue]
> My problem: there are two tables. Their columns' widths are set by the
> content. Do you have any idea how to set the width of the second
> table's columns to be the same as width of adequate columns in the
> first table ?
>[/color]

in IE:

<table id=t1 border=1>
<tr><td>qqqqqqqqqqqqqqqqqqqqqqqqqq</td></tr>
</table>
<br><br>

<table id=t2 border=1>
<tr><td>q</td></tr>
</table>


<script >

function g(x){
return document.getElementById(x)
}

g("t2").style.width = g("t1").offsetWidth

</script>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

  #3  
Old July 23rd, 2005, 05:36 PM
abs
Guest
 
Posts: n/a
Default Re: synchronizing 2 tables' columns width

Evertjan. wrote: [...]

Big thanks !
ABS


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.