Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Evening out tables

    Hey guys,

    I ran into a problem designing my site. All is working, but this.


    As you can see, the table on the right is not even with the table on the left. This code has worked in the past,
    Code:
    <script type="text/javascript">
    window.onload = function () {
    var divArray = document.getElementById('tablecontent').offsetHeight;
    var subtraction = divArray - 442;
    var tablesidebar = document.getElementById('tablesideba');
    tablesidebar.style.paddingBottom = subtraction + 'px';
    };
    </script>
    But that only works for a static page. The problem is now, both tables, the one on the left, and the one on the right, are dynamic. Either could have different heights depending on what page you are visiting. Different pages also have more than one table, and the only way I could see this working is with a million if statements or each page, defining each table being used. Is there anyway to get these two tables evened out, no matter the content using JavaScript?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,200
    Thanks
    80
    Thanked 4,453 Times in 4,418 Posts
    ??? I can't tell what you mean by the left and right tables.

    Is the left table the stuff that includes VATSIM PILOTS, only?

    Or is the left table the part that is headed by LATEST PILOTS?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •