


Printed books traditionally have margins that frame the text and make it more readable. This is something that we intuitively expect in printed matter. However, with web pages we have a different situation. Many web pages do not have margins, because until the advent of HTML 4.0, there was no easy way to provide margins in web pages.Two Traditional Ways to Create Margins Even though earlier versions of HTML did not allow margins, web designers developed ways to create margins, ways that did not depend on special HTML/XHTML tags.
 | Some designers used a table to hold a page, and they specified a fixed width for the table and hence for the page. Because the width was less than the resolution of the monitor, there were left and right margins to the page. This web site uses that scheme.
|  | Other designers used a table to create a structure that gave margins to the page, and they placed transparent gif files inside the table to fill the spaces occupied by the margins. This method allowed pages to respond to different monitor resolutions by having a variable width.
| The following pages explain these techniques.
Margins via Cascading Style Sheets HTML 4.0 provides a way for web pages to be formatted without the use of tables and transparent gifs. The CSS section gives an introduction to style sheets.[ Home ] [ Up ] [ Fixed-Width Pages ] [ Variable-Width Pages ] 

© Copyright 1998, 2011 Allen Leigh
|