EWC Profile
Generating Multi-Column HTML Tables

In Navigator 3.0 Netscape introduced the <MULTICOL> HTML tag in order develop HTML documents formatted in "newspaper" style columns. Unfortunately MULTICOL has never become part of the HTML vocabulary and it does not make sense to write HTML documents that can be viewed only by some version of Netscape. Thus the need to use other techniques to simulate "newspaper" style columns of text and graphics.

The template that is generated with makecols.exe uses HTML TABLE and and SPACER tags to perform the formatting of multiple columns. It does the formatting by specifying exact widths measured in pixels. An alternative approach, but one that is difficult to control, is to use relative table and columns widths (as a percentage of the total number of horizontal pixels).

Current recommendations for writing HTML tables tends in favor of the use of relative widths rather than absolute widths. Moreover, those concerned with accessibility issues also recommend the use of relative rather than absolute measurements in the specification of the size of HTML tables. The problem wit the use of relative table sizes, however, is that a measure of control is lost. A particular problem is that since TABLE and SPACER width and height attributes cannot receive anything but integer values, the smallest relative width or height is 1%. When formatting multiple columns for a "newspaper" look, 1% is not a fine enough measurement.

You can, of course, generate a template then experiment by replacing the absolute measurements in pixels with relative measurements in percentages.

The program produces only an HTML code fragment, not an entire HTML page or document. The output can be printed to the screen or saved in a file (named "tmp.txt") for inclusion in a larger HTML document. If all the defaults are taken a two column template similar to the following is produced:


<table border='1' cellpadding='0' cellspacing='0' width='409'>
  <tr>
    <!-- Start Column 1 -->
    <td valign='top' align='left' width='200' height='400'>
      <!-- Place your own text here -->
      <SPACER TYPE='HORIZONTAL' ALIGN='ABSBOTTOM' HEIGHT='400'
        SIZE='200'>
    </td>
    <!-- End Column 1 -->
    <!-- Start Gutter -->
    <td height='400' width='4'>
      <SPACER TYPE='VERTICAL' height='400' SIZE='4'>
    </td>
    <td height='400' width='1' BGCOLOR='#000000'>
      <SPACER TYPE='VERTICAL' height='400' SIZE='1'>
    </td>
    <td height='400' width='4'>
      <SPACER TYPE='VERTICAL' height='400' SIZE='4'>
    </td>
    <!-- End Gutter -->
    <!-- Start Column 2 -->
    <td valign='top' align='left' width='200' height='400'>
      <!-- Place your own text here -->
      <SPACER TYPE='HORIZONTAL' ALIGN='ABSBOTTOM' HEIGHT='400'
        SIZE='200'>
    </td>
    <!-- End Column 2 -->
  <tr>
</table>

This package contains three binaries, all for Intel platforms. There is a linux version (compiled under RedHat 6.2, Linux 2.2.14-5.0); a FreeBSD version (compiled under FreeBSD 4.1.1- STABLE), and a Win32 console version (will not run under DOS). Input and output is identical for all three versions. If these binaries are transferred using FTP, they should, of course, be transferred as binary files. After transfer to either FreeBSD or Linux, permissions may have to be reset using chmod 755. For a copy of the notes that follows, at the command prompt simply type "makecols help".



EWC Profile

Copyright © 1999 by Enterprise-Wide Computing, Inc.
Design by Enterprise-Wide Computing, Inc. Email: info@ewc-inc.com