Welcome to CGI City - One of the biggest WWW Resources for CGI and Perl materials
CGI City Articles

What You Should Know About Site Layout, Frames And Tables
Article by: Azam Corry

Frames Vs Tables

Some people like to use frames on their sites. I would recommend you avoid them if you can ... and you probably can.

Frames can be useful on occasion but "the pain is greater than the gain". Too many people complain of problems with frames than you can afford to ignore. So if you insist on using them, you'll need to create an alternative no-frames set of pages for these users. Honestly ...

... it's just not worth the trouble!

As If that wasn't enough reason, many search engine spiders also encounter difficulties with frames.

This means you'll either have to spend additional time learning how to overcome these shortcomings or be doomed to low search rankings. Convinced?

I hope so - for your sake!

In most of the situations in which you might feel you need to use frames you can usually use tables equally effectively. If not on their own, then in conjunction with SSI - Server Side Includes - which also allow you to write separate pages for inclusion in another 'main' page.

The left column navigation bar, for example, is one area that it may seem appealing to place in it's own frame. The content remains the same on every page and should you need to change it, you can effect a global change just by altering a single file.

What many people don't realize that you can achieve almost the same result by using an SSI callout in a table cell within the page. This will reference another file on the server which will be written into this location when called. To browsers and search engine spiders alike the page appears as a normal web page and doesn't give rise to any of the problems associated with the use of frames.

For tutorials and a look at other uses for SSI on your site, visit these free resources:

http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html

http://www.ora.com/www/info/cgi/ch05.html

The Long Wait!

Whilst we're on the subject of tables...

... don't make the same mistake I did when first using them!

Tables are great for page layout - you can put things just where you want them to appear on the page. So I made one big table for the whole page, split it up into various rows and columns, then put (nested) other tables inside these and in some places yet smaller ones inside them ...

Wrong! Wrong! Wrong!

Those of you that are quietly chuckling can stop now, thank you! Don't pretend you've never made the same mistake!

Where was I ...?

Oh yes ... tables. Now the thing with tables is that the browser downloads all the contents of the table BEFORE it actually draws anything on the screen. This includes the contents of any nested tables. So what did that mean for my beautiful page?

It took DAYS to download!

Actually, it didn't really take that much longer, but it *seemed* like it did. The page remained completely blank until the browser had downloaded every single component and then suddenly flung them all onto the page at once! Leaving your visitors staring at a blank page for ages like this is not a good way to keep them on your site!

As ever, learn from your mistakes - or my mistakes! - and split your page up into several separate tables. Keep the whole lot as simple as possible and try to avoid nesting more than one layer of tables inside another. Browsers also take longer to draw tables if you don't specify the sizes. This is because the browser has to calculate how big the table needs to be to fit in all the contents.

You can also employ tables to add color to a page in preference to slow loading graphics. Or to effectively draw attention to text placed in a colored box on the page.

Tidy and Businesslike

Forget about loud colors, blinking or scrolling text, fancy animated graphics ...

... anything that distracts the eye.

Your visitor needs to concentrate on your text if you want to get them to 'bite'. Compare your site to it's offline 'brick and mortar' equivalent.

Would you paint that bright yellow and deck it out with flashing lights?

... 'Nuff said!

Keep your pages clean and well organized. People must be able to find things easily.

Imagine calling into a supermarket in a strange town to buy a box of tissues. You're in a hurry. To your dismay you find that none of the isles are labelled and you are forced to walk all over the store to find what you want.

How annoyed and fed up would you feel?

Sure, you'd still buy ... but only because of the hassle involved in leaving the store and going to another. Online this is as easy as ...

... click ... "I'm outta here!"

Actually, when you go to a supermarket you'll normally find that everything's neatly labelled and tidily displayed in rows with signs above them... build your online store along the same lines.

Apply what I call 'the three clicks rule'... make sure your visitor can find whatever they're looking for within three clicks. If not you run the risk of them becoming frustrated and leaving.


Back to Articles Index Page


About the Author:
Azam Corry owns Now Sell! Bursting with inside information, tools and resources to help you profit online. Top Rated by Go.com and Recommended by About.com. Visit: http://www.NowSell.com/?TexNav
Get Azam's Biz Bits, viewed a "must read" ezine by thousands of online business owners: mailto:BizBits-subscribe@topica.com

This article is copyright © 1999-2000 Azam Corry "Do it Better, Do it Faster, Do it Right!"
Reprinted by CGI City with permissions.

Articles contained herein are copyright © CGI City unless stated otherwise.


Search For:
Quick jump to
Home | About Us | Contact Us | Link To Us | Search
Tips & Tutorials | References | Books | Add A Resource
Custom Programming Services | Advertise
Disclaimer | Privacy Policy

Copyright © 1998-2099    CGI City    All Rights Reserved
All original materials contained herein including text, images, and original scripts written by CGI City, are copyrighted by CGI City. All other scripts and materials are copyrighted by their respective authors/owners.