JavaScripts

Image CSS equal height columns 1

How to add this to your site

Image Copy and paste the Image JavaScript Code in a plain text editor and save it as column.js to your hard disk.

  1. Figure out what the ID names of the columns you want to balance are.
  2. Look for this line at the top of column.js
    var divs = new Array('center', 'right', 'left', 'other');
    replace these ID names with the names you're using in your HTML and remove what you're not using.
  3. You shouldn't need to edit anything else.
  4. Link column.js in the header of your page:
    <script type="text/javascript" src="(pathto...)/column.js"></script>
  5. That's about it.

Image CSS equal height columns (jQuery)

How to add this to your site

Image Copy and paste the Image JavaScript Code in a plain text editor and save it as jQuery.equalHeights.js to your hard disk.

  1. Link the jQuery library in the header of your page:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    or download the latest version Image from here.
  2. Link jQuery.equalHeights.js in the header of your page:
    <script type="text/javascript" src="(pathto...)/jQuery.equalHeights.js"></script>
  3. Put this code in the header of your page:
    <script type="text/javascript">
    $(function(){ $('.equalize').equalHeights(); });
    </script>
  4. Create a DIV container with a "equalize" class assigned to it, which should wrap your columns.
    <div class="equalize">
    <div class="column1"> ... </div>
    <div class="column2"> ... </div>
    <div class="column3"> ... </div>
    </div>
  5. That's about it.