Mozilla Composer Tutorial 4: How to Create a Multiple Column Layout

Creating a Multicolumn Layout for your Web Page using Mozilla Composer


Mozilla Composer Tutorial 4: How to Create a Multiple Column Layout for your Web Page

by Christopher Heng, thesitewizard.com

If you look at the design of many web pages on the Internet, you will probably notice that a large number of them have multiple columns. For example, on thesitewizard.com, most pages have two columns: the left column holds the site logo and navigation buttons while the right has the main content. It is possible to have more than two columns too. At the time I wrote this, thesitewizard.com's main page has three columns.

Since Mozilla Composer does not allow you to arbitrarily position text and graphics on your web page (or, at least, not the Composer that comes with versions of Mozilla up to version 1.6), you will have to use an old webmaster trick to accomplish this. Here is where the table creation tips that you learnt in the previous chapter of this tutorial come into play.

If you have not done the exercise given in Mozilla Composer Tutorial 3: How to Create Data Tables for your Web Page because you thought you will never need to use tables, you should return to that chapter and try it now. This chapter assumes that you already know how to create and configure tables.

For those of you who arrived at this page without reading any of the preceding chapters, and want to start at the beginning, you can find the first chapter of the Mozilla Composer Tutorial at https://www.thesitewizard.com/gettingstarted/mozillacomposer1.shtml

Creating a Two Column Layout for Your Web Page

The aim of this section is for you to create a page that looks something like the following:

Picture of the sample Reciprocal Links page

For the purpose of this exercise, you will be creating your Reciprocal Links page using a two column layout. A "Reciprocal Links" page is where people place links to sites that link back to them.

If you decide to keep the two column layout you create here for your site after you finish this chapter, you should go back to the pages you created earlier and modify them. This allows your site to have a consistent feel. That is, if you want a two-column layout for your site, change all the pages on your site to have the same two-column layout. Likewise if you prefer a one-column layout or a three-column layout (and so on), change them to have the same layout. This is not a hard-and-fast rule, just a general recommendation; for example, as noted above, thesitewizard.com (at the time this was written) varies its layout according to its content: it uses a three column layout for its main page and a two column layout for its articles.

Steps to Take to Create a Two-Column Layout

  1. The basic idea here is to create an invisible table that has the number of columns you want. The table is configured so that it fills the entire width of the browser window.

  2. Start Mozilla Composer with a blank page.

  3. Insert a table with Table | Insert | Table. A dialog box will appear, asking you for details. Specify 1 row, 2 columns and a width of 100% of the window. For the "Border" field, enter 0. In other words, you are creating a table without any lines that occupy the entire width (100%) of the window.

  4. Move your cursor into the left column (eg, by clicking in the blank space in that column with your mouse), and type the text given in the diagram above. The underlined items in my diagram represent links to the other pages on your site. They are the same links that you have been using in the earlier chapters of this tutorial. For your ease of reference (if you have been using the same page names that I have given in the earlier chapters), the links point to the following pages:

    • Home (index.html)
    • About Us (aboutus.html)
    • Feedback Form (feedback.html)
    • Reciprocal Links (links.html)
    • Site Map (sitemap.html)

    If you have forgotten how to create links, you can review chapter 2 again for the information. If you use the Mozilla Composer that comes with version 1.6 (and possibly other versions as well), you might find that the links you create do not appear to have the traditional blue underline. This is due to a bug in Composer; don't worry - if you created the links correctly, they will be there when your website is viewed by a browser even if it doesn't appear while you are creating the page.

  5. Before you carry on further, save the page. When prompted for a title for the page, enter "Reciprocal Links". For the filename, enter "links.html". Don't get creative here (unless you know what you're doing): if you change the filename or the title of the page at this point, you will need to go back and change all the links that you have already created in the earlier chapters of this tutorial.

    (Note: once you have saved the page, you can open it in the main Mozilla browser or another browser to verify that your links were coded correctly and appear normal. You need to do this because Composer 1.6 doesn't render the left column correctly, making it difficult for you to check visually in the web editor.)

  6. Now move your cursor to the right column (eg, by clicking in it). Type the main content of your Reciprocal Links page here. If you have no idea what to type, use the example text given in the diagram above as a temporary placeholder. The URLs for the links in the diagram are as follows:

    • "please let us know" (feedback.html). Note that this sentence is just a placeholder until you get real links to place here. Once you have something, you can delete the sentence "If you wish to exchange link with us, please let us know" or, at your option, leave it above (or below) your list.
    • thesitewizard.com's Mozilla Composer Tutorial (https://www.thesitewizard.com/gettingstarted/mozillacomposer1.shtml)
    • thefreecountry.com's Free Antivirus Software (https://www.thefreecountry.com/security/antivirus.shtml)
  7. I'm sure you have noticed that the width of the right column expanded as you typed your text. Mozilla Composer mimics the behaviour of a web browser when rendering table columns that do not have an explicit width setting. While a column that changes its width dynamically according to its content is acceptable for most data tables, it is not what we want when we use (or abuse) a table as a container for our page content.

    To fix this, move the cursor to the left colum (eg, by clicking in it). Select "Table | Properties" from the menu. Click on the "Cells" tab at the top of the dialog box that appears. Click the checkbox for "Width" to select it ("Width" can be found in the "Size" section). Type 20 in the Width field. Change the drop down box for "Width" from "Pixels" to "% of table". Click the OK button.

    The left side of the table should change its width. If the width is still not acceptable for your content, try again and use a different number till you are satisfied with the width of the left column.

    Once you are satisfied with the width for the left column, repeat the procedure for the right column. The width for the right column should be 80 if you used 20 for your left column (ie, 100% - 20% = 80%). If you've used a number other than 20 for your left column, subtract that number from 100 to get the value you need to enter.

  8. Many people use a different colour for their navigation panel (which is what the left column of your page currently functions as) to distinguish it from the main content of your page. To do this, make sure your cursor is in the left column, and select "Table | Table or Cell Background Color" from the menu. Select a colour other than black, blue or purple. (Actually, you are free to select whatever colour you want. But if you select either black, blue or purple, you will find that some of the text becomes extremely difficult to read under certain circumstances.) If you can't decide, choose one of the yellow-based colours. For example, I selected the "#ffff99" colour. (Every colour you choose has an associated colour value. This value appears in the field at the bottom of the dialog box. If you want to choose the same colour I did, click on the colours until you find one that has "#ffff99" appearing in that field.)

  9. If you have not already done so, you may wish to change the size of the text and the typeface used to something other than the default. For example, I used the "Helvetica, Arial" option in the "Format | Font" menu for the text. You can also use a graphic image with your site's logo in place of the text "Shakespeare's Website". (Make sure that the width of the logo is suitably narrow so that it can fit into your left column when your site is viewed with a 800x640 screen resolution.)

    When you're done with your changes, save the page and publish it.

How to Create a Three-Column (or More) Layout

Although you will not be creating any three-column page for the purpose of this tutorial, if you find you need such a layout, simply enter the required number (eg, "3" for a three-column page) instead of "2" for the "Columns" field when you create your table.

Special Cases

Sometimes you need to create a page that is basically two columns but with a single column either at the top or at the bottom of the page. For example, you may want to put a banner at the top of the page that spans both columns. Or you might want to put a copyright notice at the bottom of the page that stretches from the left side of the page to the right.

The easiest way to do this in Mozilla Composer is to simply place the banner or text before (or after) your table. Another method is to create a table with more than one row, and join the cells in top row (or the bottom row) so that there is only one column for that row. I leave these special cases as an exercise for the reader.

Creating a Site Map

At this point, you have sufficient knowledge to create a respectable-looking website with multiple pages. You can now consolidate your knowledge by creating (on your own) a Site Map for your website.

A Site Map is a page that links to every important document on your website. Such a page is a useful aid to your visitors in case they want to locate a particular page quickly. It is usually present in well-designed sites with multiple pages, and is one of the facilities that improve a site's usability. Although your site has only a few pages at present, and all of them are listed in your left-column navigation panel, it is a good practice to always create a site map for your sites (unless the site only has one or two pages).

You can see an example of a site map by checking out thesitewizard.com's Site Map at https://www.thesitewizard.com/sitemap.shtml. You do not need to use a three-column layout for your Site Map though; the only reason thesitewizard.com's Site Map has three columns is because there are too many pages to list in a linear fashion. Your Site Map can be a straightforward list of links to all your pages if you like. In fact, it is best to keep your Site Map simple so that visitors can find what they want easily. Restrain yourself from making it into such a graphical feast that your visitors have to solve a maze of visual puzzles before they can locate your pages.

Next Chapter: the Feedback Form

In the next chapter, we will create the final page of your website - the Feedback Form page. The latter will allow your visitors to contact you using a web form.

Copyright 2004 by Christopher Heng. All rights reserved.
Get more free tips and articles like this, on web design, promotion, revenue and scripting, from https://www.thesitewizard.com/.

thesitewizard.com's Mozilla Composer Series

You are here: Top > Getting Started with Your Website > Mozilla Composer Tutorial 4: How to Create a Multiple Column Layout for your Web Page in Mozilla Composer

thesitewizard™ News Feed (RSS Site Feed)  Subscribe to thesitewizard.com newsfeed

Do you find this article useful? You can learn of new articles and scripts that are published on thesitewizard.com by subscribing to the RSS feed. Simply point your RSS feed reader or a browser that supports RSS feeds at https://www.thesitewizard.com/thesitewizard.xml. You can read more about how to subscribe to RSS site feeds from my RSS FAQ.

Please Do Not Reprint This Article

This article is copyrighted. Please do not reproduce or distribute this article in whole or part, in any form.

Related Pages

New Articles

Popular Articles

How to Link to This Page

It will appear on your page as:

How to Create a Multiple Column Layout for your Web Page in Mozilla Composer





Home
Donate
Contact
Link to Us
Topics
Site Map

Getting Started
Web Design
Search Engines
Revenue Making
Domains
Web Hosting
Blogging
JavaScripts
PHP
Perl / CGI
HTML
CSS
.htaccess / Apache
Newsletters
General
Seasonal
Reviews
FAQs
Wizards

 

 
Free webmasters and programmers resources, scripts and tutorials
 
HowtoHaven.com: Free How-To Guides
 
Site Design Tips at thesitewizard.com
Find this site useful?
Please link to us.