Small b Systems blog

Information for small businesses

Use Javascript to make two columns the same height

Home Page

Our web site needed the left and right columns to be the same height because of the background color. We use this simple script which is loaded from an external file.

 <!--
    var x = document.getElementById("column_l").clientHeight;
    var y = document.getElementById("column_r").clientHeight;
   
    if (x > y)
    {
        document.getElementById("column_r").style.height = x + 'px';
    }
    if(x < y)
    {
    document.getElementById("column_l").style.height = y + 'px';
    }
-->

 

About the author

My name is Paul Steinberg and I am the owner of Small b Systems. I have been working with computers for 33 years. I have been designing business and manufacturing systems for 49 years.

A system is a collection of orgainized tasks which guide an operation to a predictable conclusion. Unlike an individuals's routine, a system can be used by anyone.

I have worked on Wall Street, in military electronics, retailing, professional photography, manufacturing, barter and woodworking. I have designed systems in all of these industries.

Sign in