Best PracticesCombining Layers with Tables to Ensure Proper Page Layout


The use of tables and layers has been a hotly contested subject on web development forums over the last few years. Those in the tables camp have rallied around the battle call of "Some browsers don't support layers, so we don't want to alienate visitors." Those in the layers camp have returned fire with "Tables produce bloated code and are meant to display only tabular data." On a rare occasion, however, someone steps in and suggests the use of both in design, leaving the two sides scratching their heads. Why can't we use both in our designs to overcome the weaknesses of both? The answer is...we can.

The trick here is to leverage the consistency of tables while reducing their use to a point that it won't bloat our code. In addition, we can reduce the possibility that older browsers will completely destroy our layers by nesting them inside tables to ensure that even if they are rendered improperly, they will at least be placed in the correct general location and won't leave our visitors wondering what went wrong in the layout.

An excellent example of the combination of tables and layers can be found at http://developer.apple.com/internet/webcontent/bestwebdev.html. This article provides a solid example of how to blend layers and tables to produce a consistently placed footer row, without excess code.



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net