CSS Page Layout Templates
Introduction/2 Column Templates
The following page templates are all constructed
using XHTML1.0 and CSS2.
Templates marked with
are ones I
recommend.
Please note: these templates are a learning tool and should be thoroughly tested before being used on
a 'production' web site.
The templates are valid CSS2 and XHTML1.0 Transitional and have been tested
on WinXP with IE6, Opera 7.11 and Mozilla 1.5b as well as Firefox 0.8 & Netscape 7.1
(which are basically the same as Mozilla).
Templates: Two column |
Three column |
General
Two
Column Flexible
Description:
Probably the easiest page to make. Contains two
layout divs, the main content div is just floated to the left.
Very simple!
Actions:
View | Image
are related to ways of making buggy browsers behave, while othersdescribe ways to write completely correct CSS and HTML and stillmangle the document display, simply by not thinking about theconsequences of one's actions.11.2.1. Making Styles Work
This is an easy one. If you want
Preview | Download [ 5k]
[ZIP]
Two
Column Flexible With Header
Description:
Basically the same template as above but with the
addition of a header div for page title, your logo or banners
etc. Again very simple to set up.
Two
Column, Left Column Static
Description:
Two columns, the left
column is absolutely positioned on the left and is a fixed width. The right
content column is sized and positioned by using margins and will
resize with the browser window.
Two
Column, Left Column Static, with Header Bar
Description:
This is the same template as above but with the
addition of a simple header bar which can be used for links,
search box etc..
Two
Column Fixed Width with Header & Footer 
Description:
A fixed width centered page with a header,
footer, left navigation column and right content column. One of
my favourites.
Templates: Two column |
Three column |
General
Note: The poor colour schemes and thick borders
of the templates are for demonstration purposes. :-)
both the top and bottom of the content-height to arrive at an inlinebox which is, in this case,
high. This12-pixel inline box is centered vertically within the content-heightof the element.
So far it sounds like we've done the same thing to each bit oftext. This is not quite the case. The inline boxes don'tactually line up, as we can see in Figure 8-50,because the text is all baseline-aligned.
An offset block of text showing a quotation in a larger size is
usually called a "pull quote." We have one near the
middle of the second column, so let's decide how that will be
handled. First, the text is a bit larger than the font size of the
main article text, and it's in a sans serif font. Also, it has
those nice lines at the top and bottom of the pull quote's box,
both of which stretch slightly beyond the right and left boundaries
of the text itself. The background is a light gray, and there is a