synchronizing 2 tables' columns width

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • abs

    #1

    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


  • Evertjan.

    #2
    Re: synchronizing 2 tables' columns width

    abs wrote on 06 feb 2005 in comp.lang.javas cript:
    [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>qqqqqqq qqqqqqqqqqqqqqq qqqq</td></tr>
    </table>
    <br><br>

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


    <script >

    function g(x){
    return document.getEle mentById(x)
    }

    g("t2").style.w idth = g("t1").offsetW idth

    </script>

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

    Comment

    • abs

      #3
      Re: synchronizing 2 tables' columns width

      Evertjan. wrote: [...]

      Big thanks !
      ABS


      Comment

      Working...