Publishing with XML - Herong's Tutorial Examples - v4.02, by Dr. Herong Yang
Border Layout for Web Pages
This section describes the border layout implemented in HTML tables and used as the default Web page layout in hyPub.
Border Layouts
I designed the border layout to be used as the default Web page layout in hyPub based on the BorderLayout class in Java Swing package. A border layout has 5 regions placed as shown below:
------------------------------------ | Top | |----------------------------------| | | | | | | | | | | | | | | | | | L | | R | | e | | i | | f | Center | g | | t | | h | | | | t | | | | | | | | | | | | | |----------------------------------| | Bottom | ------------------------------------
The border layout seems to be the most flexible layout for a simple Web page. Here are some ideas of how I used the border layout for my book Web pages:
Implementing the Border Layout as a Table
Implementing the border layout as a table is so easy. Here is my HTML code for the border layout:
<table class="frame" cellspacing="0" cellpadding="0"> <tr><td class="frameTop" colspan="3"> Top area </td></tr> <tr><td class="frameLeft"> Left area </td> <td class="frameCenter"> Center area </td> <td class="frameRight"> Right area </td></tr> <tr><td class="frameBottom" colspan="3"> Bottom area </td></tr> </table>
Notice that:
Table of Contents
Ideas on Publishing Books using XML
Overview of hyPub - A Simple XML Publishing Tool
Writing Book Contents in XHTML Source Files
Transforming Book Source Files with XSL Technology
►Designing Web Page Layouts with Tables
Using "table" Elements for Page Layouts
Adding a Frame for the Center Area
Controlling Web Page Appearance with CSS
Sharing HTML Codes with JavaScript Files
Generating Web Pages with hyPub
Formatting Printable Documents with XSL-FO