XML technologies / CSS / Advanced websites with CSS / A simple CSS layout / The layout

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

Many web page designs begin life as a sketch in a graphics program. Our first example page is no exception: we start with an example layout or “design mockup” created in Fireworks.

Designing the layout as a graphics file

Figure: Designing the layout as a graphics file.

Starting with a visual representation, as we do here, lets us think about the page structure before we begin implementing it in CSS or XHTML. This gives us the opportunity to choose the best approach before writing a single line of code.

This layout divides the page into three areas:

  1. a header containing the site logo and part of the main navigation;

  2. the main area, consisting of a large image above a list of news items;

  3. a sidebar containing some additional entries.

Marking the layout areas

Figure: Marking the layout areas.

This could be described as a two-column layout with a header. Representing a design as a combination of its main areas makes it easier to decide how to implement it.

  

 

 

 

back to top